{ Community }
  • Academy
  • Docs
  • Developers
  • Resources
    • Community Articles
    • Apigee on GitHub
    • Code Samples
    • Videos & eBooks
    • Accelerator Methodology
  • Support
  • Ask a Question
  • Spaces
    • Product Announcements
    • General
    • Edge/API Management
    • Developer Portal (Drupal-based)
    • Developer Portal (Integrated)
    • API Design
    • APIM on Istio
    • Extensions
    • Business of APIs
    • Academy/Certification
    • Adapter for Envoy
    • Analytics
    • Events
    • Hybrid
    • Integration (AWS, PCF, Etc.)
    • Microgateway
    • Monetization
    • Private Cloud Deployment
    • 日本語コミュニティ
    • Insights
    • IoT Apigee Link
    • BaaS/Usergrid
    • BaaS Transition/Migration
    • Apigee-127
    • New Customers
    • Topics
    • Questions
    • Articles
    • Ideas
    • Leaderboard
    • Badges
  • Log in
  • Sign up

Get answers, ideas, and support from the Apigee Community

  • Home /
  • Edge/API Management /
avatar image
2
Question by Anandhu · May 07, 2017 at 11:56 PM · 1.1k Views service calloutservicecalloutvariabletimestamp

how to get the service callout request sent and response received timestamp?

Hi Everyone,

I wanted to log the timestamp of the request and response which was sent from the service callout policy. I couldn't find the proper system variable reference to use it. I know there are apigee system variables for accessing the client and target, request sent (e.g. target.sent.end.timestamp) and response received (e.g. target.received.end.timestamp).

Similarly is there any apigee system variable for accessing the service callout policy request sent and response received timestamp.

Thanks,

Anand

Comment
Add comment
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Close

1 Answer

  • Sort: 
avatar image
3
Best Answer

Answer by sudheendras   · May 08, 2017 at 03:19 PM

You could use the following flow-variable.

apigee.metrics.policy.<policy name>.timeTaken

The value is the time taken by the policy (in your case Service-Callout) in nano-seconds. Al though this won't give you sent/received timestamp, it gives total time time-taken. If you are specifically interested in the start/end time, use JavaScript policies before and after your Service-CallOut policy.

Comment
Add comment Show 6 · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Anandhu · May 10, 2017 at 08:57 PM 0
Link

we did try that javascript thing but its not that accurate. I felt like this feature should be available to access the request and response timestamp for service callout policy.?

avatar image sudheendras ♦ Anandhu   · May 11, 2017 at 07:27 PM 0
Link

Ok. I will create a feature-request to provide variables for this. Thanks!

avatar image Anandhu sudheendras ♦ · May 17, 2017 at 12:07 AM 0
Link

@sudheendra: Thanks! That would be great to have in apigee.

avatar image jitender Kumar sudheendras ♦ · Mar 30, 2020 at 04:41 PM 0
Link

hi @sudheendra: is there any feature providing serviceCallout start and end time stamp? ServiceCallOut TimeTaken currently gives time taken by this policy and not time spent by end service.

avatar image Chawki MATTA sudheendras ♦ · Oct 16, 2020 at 06:51 AM 0
Link

Hello @sudheedras,

is the feature-request to provide start/end time variables for service callout complete? could'nt find any variables for SC start/end time in the documentation...
Please advise,

Show more comments

Follow this Question

Answers Answers and Comments

50 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

servicecallout.{policy-name}.target.url returns null 1 Answer

working code of curl in postman Not able to convert to service call out code 2 Answers

Not able to remove/reset the servicecallout.requesturi variable 2 Answers

How can I add a payload to a service callout? 3 Answers

ServiceCallout : how to exploit the response 3 Answers

  • Products
    • Edge - APIs
    • Insights - Big Data
    • Plans
  • Developers
    • Overview
    • Documentation
  • Resources
    • Overview
    • Blog
    • Apigee Institute
    • Academy
    • Documentation
  • Company
    • Overview
    • Press
    • Customers
    • Partners
    • Team
    • Events
    • Careers
    • Contact Us
  • Support
    • Support Overview
    • Documentation
    • Status
    • Edge Support Portal
    • Privacy Policy
    • Terms & Conditions
© 2021 Apigee Corp. All rights reserved. - Apigee Community Terms of Use - Powered by AnswerHub
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Spaces
  • Product Announcements
  • General
  • Edge/API Management
  • Developer Portal (Drupal-based)
  • Developer Portal (Integrated)
  • API Design
  • APIM on Istio
  • Extensions
  • Business of APIs
  • Academy/Certification
  • Adapter for Envoy
  • Analytics
  • Events
  • Hybrid
  • Integration (AWS, PCF, Etc.)
  • Microgateway
  • Monetization
  • Private Cloud Deployment
  • 日本語コミュニティ
  • Insights
  • IoT Apigee Link
  • BaaS/Usergrid
  • BaaS Transition/Migration
  • Apigee-127
  • New Customers
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
  • Badges