Skip to content
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

Log HTTP Headers, Request/Response Body as Custom Request Properties #1693

Closed
zoomingrocket opened this issue May 18, 2021 · 5 comments · Fixed by #2036
Closed

Log HTTP Headers, Request/Response Body as Custom Request Properties #1693

zoomingrocket opened this issue May 18, 2021 · 5 comments · Fixed by #2036

Comments

@zoomingrocket
Copy link

zoomingrocket commented May 18, 2021

Is your feature request related to a problem? Please describe.
We use extensive custom HTTP Headers for various API transactions and would like to trace or have visibility into App Insights and visualize as part of the Request Properties panel

Describe the solution you would like
Allow configuration to enable logging for list of HTTP headers specified or if possible log all headers, Request/Response Body as custom Request Properties

Describe alternatives you have considered
Currently, we are trying to print headers, body as an INFO in STDOut to get captured in detailed telemetry and then locate transactions via transaction search

Additional context
Current Use: Java Agent - 3.0.3 GA
Request Properties Panel - Custom Properties

image

@zoomingrocket zoomingrocket changed the title Log HTTP Headers, Request/Response Body as Custom Request Properties? Log HTTP Headers, Request/Response Body as Custom Request Properties May 18, 2021
@trask
Copy link
Member

trask commented May 19, 2021

hey @zoomingrocket! have you seen this example for adding custom dimensions to the captured requests? https://docs.microsoft.com/en-us/azure/azure-monitor/app/java-in-process-agent#add-request-custom-dimensions-using-the-2x-sdk

@zoomingrocket
Copy link
Author

@trask - We are using java agent-based v3.0.3 and based on that JSON for custom dimension requires environment variable? Just trying to understand how we can make it dynamic to collect with jvm execution?

{ "customDimensions": { "mytag": "my value", "anothertag": "${ANOTHER_VALUE}" } }

@trask
Copy link
Member

trask commented May 19, 2021

hey @zoomingrocket, are you able to modify the code in the application? if so, the link above describes how to use the 2.x SDK to send add custom dimensions to the request that is auto-collected by the 3.0 agent

@zoomingrocket
Copy link
Author

@trask - No scope of plugging 2.x SDK as its proprietary platform where we are using in JavaAgent. Hoping we can allow few headers to log via JSON file custom dimension?

@trask
Copy link
Member

trask commented May 20, 2021

Got it, so no ability to modify the app, and you need pure codeless configuration option for this.

@ghost ghost added the Status: Fixed label Jan 10, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Feb 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants