-
Notifications
You must be signed in to change notification settings - Fork 1
feat: Update tracing hook for semantic convention updates. #31
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
Conversation
| def __init__(self, options: HookOptions = HookOptions()): | ||
| self.__tracer = trace.get_tracer_provider().get_tracer("launchdarkly") | ||
| self.__options = options | ||
| if self.__options.include_variant: |
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.
I don't know an actually reasonable way to do this without the logger instance.
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.
You can just grab the logger from wherever. Python is just like that.
from logging import getLogger
logger = getLogger('launchdarkly-otel')
logger.warning('Hi there')If we document that we always use the 'launchdarkly-otel' named logger, then it makes it easy for customers to affect the formatting without having to pass a logger around everywhere.
But this honestly seems pretty reasonable to me.
…emantic-conventions
…ython-server-sdk-otel into rlamb/minimum-version-3.9
| def __init__(self, options: HookOptions = HookOptions()): | ||
| self.__tracer = trace.get_tracer_provider().get_tracer("launchdarkly") | ||
| self.__options = options | ||
| if self.__options.include_variant: |
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.
You can just grab the logger from wherever. Python is just like that.
from logging import getLogger
logger = getLogger('launchdarkly-otel')
logger.warning('Hi there')If we document that we always use the 'launchdarkly-otel' named logger, then it makes it easy for customers to affect the formatting without having to pass a logger around everywhere.
But this honestly seems pretty reasonable to me.
🤖 I have created a release *beep* *boop* --- ## [1.2.0](1.1.0...1.2.0) (2025-07-11) ### Features * Update tracing hook for semantic convention updates. ([#31](#31)) ([25dafad](25dafad)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
No description provided.