Skip to content

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

Closed

Conversation

barreeeiroo
Copy link
Contributor

@barreeeiroo barreeeiroo commented Aug 4, 2023

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:

  • Migration process documented
  • Implement warnings (if it can live side by side)

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.

Clarifies Tracer's documentation page by including its related environment variables.
@barreeeiroo barreeeiroo requested a review from a team August 4, 2023 11:57
@boring-cyborg boring-cyborg bot added the documentation Improvements or additions to documentation label Aug 4, 2023
@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 4, 2023
@sonarqubecloud
Copy link

sonarqubecloud bot commented Aug 4, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@github-actions github-actions bot added the internal Maintenance changes label Aug 4, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

No related issues found. Please ensure there is an open issue related to this change to avoid significant delays or closure.

@github-actions github-actions bot added do-not-merge need-issue PRs that are missing related issues labels Aug 4, 2023
Copy link
Contributor

@heitorlessa heitorlessa left a 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.

Copy link
Contributor

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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 ;-)

@heitorlessa heitorlessa changed the title chore(docs): Include Tracer environment variables docs(tracer): include environment variables Aug 4, 2023
@heitorlessa heitorlessa linked an issue Aug 4, 2023 that may be closed by this pull request
1 task
@heitorlessa heitorlessa removed do-not-merge need-issue PRs that are missing related issues labels Aug 4, 2023
@barreeeiroo
Copy link
Contributor Author

barreeeiroo commented Aug 4, 2023

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.

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 :)

@heitorlessa
Copy link
Contributor

If you can be so kind, why not <3

@barreeeiroo
Copy link
Contributor Author

Closing in favour of #2925 (includes all pages)

@barreeeiroo barreeeiroo closed this Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation internal Maintenance changes size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docs: Include environment variables in Tracer
2 participants