8000 Apigee Emulator - Trace/Debug export · Issue #847 · GoogleCloudPlatform/cloud-code-vscode · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Apigee Emulator - Trace/Debug export #847

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
gosunilgo opened this issue Sep 6, 2023 · 9 comments
Open

Apigee Emulator - Trace/Debug export #847

gosunilgo opened this issue Sep 6, 2023 · 9 comments
Assignees
Labels
kind/enhancement New feature or request

Comments

@gosunilgo
Copy link

Use case
What are you trying to do that our extension doesn't let you?

Trace access doesn't seem to be enabled in Apigee Emulator. We would like same feature/ability to trace headers like Apigee-Debug - https://cloud.google.com/apigee/docs/api-platform/debug/trace

Example - view traffic during each policy step

Like OPDK or apigee-hybridX, hosted version clearly allows ease-of-use by quickly viewing trace, via console. We are not looking for UI-replacement, but the actual tracefile contents. We can upload tracefile to hybrid for analysis.

ideas?

Feature

Option1 - Give user ability to download tracefile/debugfile from apigee-emulator. Like OPDK, we would like to download the tracefile during/after the test executions
Option2 - Can the emulator emit metrics for scraping purposes ?

@j-windsor j-windsor added the kind/enhancement New feature or request label Sep 7, 2023
@shirishtrivikr
Copy link
Collaborator

@gosunilgo Thanks for the feature request

The feature is currently under development and we have a minimal feature set

Currently this feature can be accessed by adding following configuration option to user settings
cloudcode.beta.enableApigeeTrace: true

Once this flag is enabled

  1. You can open a downloaded trace by using a Command palette option Cloud Code: Open Apigee trace
  2. In the Emulator view you will see A trace button next to each deployed application. Clicking this button the trace will be activated and as soon as the deployed proxy sees some traffic the trace view should pop up giving you the details about the request.
image

A sample view of the trace
image

@marcinkubica
Copy link
marcinkubica commented Mar 15, 2024

@shirishtrivikr I'm loving this feature!
One note - I've noticed the ordering of calls is not being populated in order in the report.
I'm on gcr.io/apigee-release/hybrid/apigee-emulator:1.11.0

image

image

image

image

image

@adeelabid90
Copy link
adeelabid90 commented Mar 26, 2024

I am getting some error when i add config to setting, Using the 1.11.0 emulator. Any one can guide on this?

image

@sripasg
Copy link
sripasg commented Mar 27, 2024

The squiggly underline for that setting is indicating a warning not an error. Are you getting any actual error while exercising this feature?

Note to @shirishtrivikr to respond for any group the user needs to be part of to exercise the trace feature.

I am getting some error when i add config to setting, Using the 1.11.0 emulator. Any one can guide on this?

image

@adeelabid90
Copy link
adeelabid90 commented Mar 28, 2024

@sripasg yes its a warning, I am able to start tracing, Traces view automatically loaded when trace data is available but it automatically stop receiving request after some time, I have to start it again n again. Is there any setting or config available to set how long it should receive calls

@shirishtrivikr
Copy link
Collaborator
shirishtrivikr commented Mar 28, 2024 via email

@bartdw
Copy link
bartdw commented Jun 2, 2024

I use the apigee emulator to run some unit tests on proxy code in a pipeline. Until now I could only verify the response body/headers. Since this is available I could also verify internal variables.
Is there any documentation on the emulator's api calls to start the debug trace and export the variables?

Thanks,
Bart

@bartdw
Copy link
bartdw commented Jul 9, 2024

If someone is interested in the api calls the emulator is supporting (for taking traces): I looked around in the sourcecode of the plugin and made a list of them, which you can find here: #524 (comment)

@sedghi
Copy link
sedghi commented May 24, 2025

The trace feature is inconsistent for me. Sometimes it works fine after I reach the endpoint, but other times it doesn't, and I haven't been able to figure out why. Does anyone have any ideas? Sometimes nothing pops up, and sometimes I get, like, five at once. I tried http://localhost:8080/v1/emulator/trace/transactions?sessionid=6beXXX, but it says the messages are empty, so I guess it literally can't pick up the trace in those instances.

I tried stopping the emulator container and reseting it and the following errors kept coming infinitely

/2025 6:09 PM EMULATOR ERROR Trace download failed with Error: Get trace transactions failed with AggregateError
05/24/2025 6:09 PM EMULATOR ERROR Trace download failed with Error: Get trace transactions failed with AggregateError
05/24/2025 6:10 PM EMULATOR ERROR Trace download failed with Error: Get trace transactions failed with AggregateError
05/24/2025 6:10 PM EMULATOR ERROR Trace download failed with Error: Get trace transactions failed with AggregateError
05/24/2025 6:10 PM EMULATOR ERROR Trace download failed with Error: Get trace transactions failed with AggregateError
05/24/2025 6:10 PM EMULATOR ERROR Trace download failed with Error: Get trace transactions failed with AggregateError
05/24/2025 6:10 PM EMULATOR ERROR Trace download failed with Error: Get trace transactions failed with AggregateError
05/24/2025 6:10 PM EMULATOR ERROR Trace download failed with Error: Get trace transactions failed with AggregateError
05/24/2025 6:10 PM EMULATOR ERROR Trace download failed with Error: Get trace transactions failed with AggregateError
05/24/2025 6:10 PM EMULATOR ERROR Trace download failed with Error: Get trace transactions failed with AggregateError
05/24/2025 6:10 PM EMULATOR ERROR Trace download failed with Error: Get trace transactions failed with AggregateError
05/24/2025 6:10 PM EMULATOR ERROR Trace download failed with Error: Get trace transactions failed with AggregateError
05/24/2025 6:10 PM EMULATOR ERROR Trace download failed with Error: Get trace transactions failed with AggregateError
05/24/2025 6:10 PM EMULATOR ERROR Trace download failed with Error: Get trace transactions failed with AggregateErr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

8 participants
0