Skip to content

Conversation

@jeremydvoss
Copy link
Member

Update samples to rely on conn str env var. Updated samples that used to have instrumentation configs with env var instructions.

@jeremydvoss jeremydvoss marked this pull request as ready for review May 18, 2023 22:56
@jeremydvoss jeremydvoss requested review from a team and lzchen as code owners May 18, 2023 22:56
raise Exception("Hit an exception")


# Set the OTEL_PYTHON_EXCLUDE_URLS environment variable to "http://127.0.0.1:8000/exclude"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should add this env var to the README

Copy link
Member Author

Choose a reason for hiding this comment

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

I guess we could. It's part of the instrumentation's readmes, but we did include it in the docs. There are other instrumentation related env vars I have not delt with much, so I think it would make sense to leave that for another PR where I add a whole section for instrumentation configuration env vars


configure_azure_monitor(
connection_string="<your-connection-string>",
# connection_string="<your-connection-string>",
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the reason for this change?

Copy link
Member Author

Choose a reason for hiding this comment

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

The distros are generally prioritizing the use of the conn str env var over pass ins. So, I made this change to match the distro docs. It also makes running the samples far less tedious.

@jeremydvoss jeremydvoss merged commit 5a53e49 into microsoft:main May 22, 2023
@jeremydvoss jeremydvoss mentioned this pull request Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants