Add OpenTelemetry to the Strings worker#7
Conversation
|
He @rgayon
|
Not sure how much more I can remove from here to put back in openrelik-common: I need to call trace.get_current_span() in the context of the worker to get the span object to which I then add the specifics of this worker's config, and other info that could be useful to log. Let me try whether I can provide a more common "telemetry.add_attribute()" that will call trace.get_current_span() and make sure it's valid |
|
@hacktobeer PTAL, as well as relevant commit in openrelik_common : openrelik/openrelik-common#5 |
Codecov Report❌ Patch coverage is
🚀 New features to boost your workflow:
|
hacktobeer
left a comment
There was a problem hiding this comment.
Tested this with the new openrelik-common refactored code: the current implementation would ONLY work if people have some OTEL backend setup. The worker(s) also need to work when people do not have OTEL setup. See the logging implementation in openrelik-common for a fail safe example.
This should now be addressed in openrelik/openrelik-common#8 |
|
Still unsure what's the best way to write down the required openrelik-common version in pyproject.toml |
|
woops forgot to re-request review |
I suppose this shouldn't be merged until openrelik/openrelik-common#1 is
And then pyproject.toml should be updated.
While testing I was using:
openrelik-common = { git = "https://github.com/rgayon/openrelik-common.git", branch="otel-init2"}un pyproject.toml to pull the required dependancy