Skip to content

Conversation

@kinyoklion
Copy link
Member

No description provided.

def __init__(self, options: HookOptions = HookOptions()):
self.__tracer = trace.get_tracer_provider().get_tracer("launchdarkly")
self.__options = options
if self.__options.include_variant:
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 don't know an actually reasonable way to do this without the logger instance.

Copy link
Member

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.

@kinyoklion kinyoklion marked this pull request as ready for review June 25, 2025 17:24
@kinyoklion kinyoklion requested a review from a team as a code owner June 25, 2025 17:24
def __init__(self, options: HookOptions = HookOptions()):
self.__tracer = trace.get_tracer_provider().get_tracer("launchdarkly")
self.__options = options
if self.__options.include_variant:
Copy link
Member

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.

@kinyoklion kinyoklion merged commit 25dafad into main Jul 11, 2025
9 checks passed
@kinyoklion kinyoklion deleted the rlamb/o11y-279/update-semantic-conventions branch July 11, 2025 21:12
kinyoklion pushed a commit that referenced this pull request Jul 14, 2025
🤖 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>
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