-
Notifications
You must be signed in to change notification settings - Fork 421
docs(tracer): include environment variables #2922
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
docs(tracer): include environment variables #2922
Conversation
Clarifies Tracer's documentation page by including its related environment variables.
Kudos, SonarCloud Quality Gate passed! |
No related issues found. Please ensure there is an open issue related to this change to avoid significant delays or closure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two tiny changes so we can standardize it later.
We require an issue for every PR, so I'll create a documentation issue for this to prioritize it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you add them under a new subsection Environment variables
, please?
It'll make it easier for customers to link to that section, and elsewhere in the docs. We could then follow this structure for anything else we missed :-)
| **Response Capture** | Captures Lambda or method return as metadata. | `POWERTOOLS_TRACER_CAPTURE_RESPONSE` | `true` | | ||
| **Exception Capture** | Captures Lambda or method exception as metadata. | `POWERTOOLS_TRACER_CAPTURE_ERROR` | `true` | | ||
|
||
Both `POWERTOOLS_TRACER_CAPTURE_RESPONSE` and `POWERTOOLS_TRACER_CAPTURE_ERROR` can be set on a per-method basis (see [Advanced](#advanced)), overriding the environment variable value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both `POWERTOOLS_TRACER_CAPTURE_RESPONSE` and `POWERTOOLS_TRACER_CAPTURE_ERROR` can be set on a per-method basis (see [Advanced](#advanced)), overriding the environment variable value. | |
Both [`POWERTOOLS_TRACER_CAPTURE_RESPONSE`](#disabling-response-auto-capture) and [`POWERTOOLS_TRACER_CAPTURE_ERROR`](#disabling-exception-auto-capture) can be set on a per-method basis, consequently overriding the environment variable value. |
Adding link to each specific section to improve the experience ;-)
No worries, I'll update it this afternoon. By the way, now that you mention standardizing it, I could retarget the PR and, rather than only updating Tracer, update all pages to include this Environment Variables section. Not sure if it's in your roadmap or you only want Traver by now, but it shouldn't take too long and I've already started with Traver, so why not :) |
If you can be so kind, why not <3 |
Closing in favour of #2925 (includes all pages) |
Issue number: #2923
Clarifies Tracer's documentation page by including its related environment variables.
Summary
This PR improves Tracer's documentation page by including its related environment variables. They were only included on the main page, though it may be useful to also mention them in their corresponding section.
Changes
Under the Getting started section, a table listing all Tracer's environment variables has been included. It also mentions the preference order (method parameter overrides environment variable).
User experience
When navigating through documentation, developers will now find the environment variables for Tracer on its page. It is useful as it allows us to quickly understand the behaviour of these environment variables by Ctrl+F'ing them.
This comes from personal experience, as I found out about these environment variables by checking the parameters of Tracer decorators' source code. But when going to Tracer's documentation page, I couldn't find these environment variables, until I realized they were only in the main page.
Checklist
If your change doesn't seem to apply, please leave them unchecked.
Is this a breaking change?
No
Checklist:
Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.