-
Notifications
You must be signed in to change notification settings - Fork 929
docs: update logs example to use opentelemetry-instrumentation-logging #5344
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
base: main
Are you sure you want to change the base?
Changes from all commits
47aa6ce
9258631
c3849f6
d9b78d1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| docs: update logs example to use `opentelemetry-instrumentation-logging` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -51,6 +51,10 @@ | |
| logger1 = logging.getLogger("myapp.area1") | ||
| logger2 = logging.getLogger("myapp.area2") | ||
|
|
||
| # Ensure log records propagate to root logger so the handler picks them up | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are these really needed? Would be nice to test the examples
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tested this end to end with the collector, all 6 log records came through fine. I have added the explicit
Also tested locally that
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Propagate should be |
||
| logger1.propagate = True | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Propagate is true by default, we should mention that in a comment here |
||
| logger2.propagate = True | ||
|
|
||
| logger1.debug("Quick zephyrs blow, vexing daft Jim.") | ||
| logger1.info("How quickly daft jumping zebras vex.") | ||
| logger2.warning("Jail zesty vixen who grabbed pay from quack.") | ||
|
|
||
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.