Skip to content
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

Add CodeSource parameter #409

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Add CodeSource parameter #409

wants to merge 1 commit into from

Conversation

Kludex
Copy link
Member

@Kludex Kludex commented Aug 30, 2024

No description provided.

@Kludex Kludex marked this pull request as draft August 30, 2024 13:32
Copy link

Deploying logfire-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5cc1734
Status: ✅  Deploy successful!
Preview URL: https://86b1ba79.logfire-docs.pages.dev
Branch Preview URL: https://add-code-source-params.logfire-docs.pages.dev

View logs

Copy link

codecov bot commented Aug 30, 2024

Codecov Report

Attention: Patch coverage is 76.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 99.93%. Comparing base (a404923) to head (5cc1734).

Files with missing lines Patch % Lines
logfire/_internal/config.py 68.42% 4 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##              main     #409      +/-   ##
===========================================
- Coverage   100.00%   99.93%   -0.07%     
===========================================
  Files          128      128              
  Lines         9355     9380      +25     
  Branches      1217     1221       +4     
===========================================
+ Hits          9355     9374      +19     
- Misses           0        4       +4     
- Partials         0        2       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -145,6 +145,15 @@ def log_level_attributes(level: LevelName | int) -> dict[str, otel_types.Attribu
RESOURCE_ATTRIBUTES_PACKAGE_VERSIONS = 'logfire.package_versions'
"""Versions of installed packages, serialized as list of json objects with keys 'name' and 'version'."""

RESOURCE_ATTRIBUTES_CODE_GIT_REF = 'logfire.code.git_ref'
Copy link
Contributor

Choose a reason for hiding this comment

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

In general we should try following semantic conventions where they exist. With a bit of effort I found https://opentelemetry.io/docs/specs/semconv/attributes-registry/vcs/. This would be vcs.repository.ref.revision.

Just noting that, not saying we should go with this overall approach or spend time on this now.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, I didn't find it. Nice. Thanks.

Copy link
Member Author

Choose a reason for hiding this comment

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

They are experimental. They are not included in the opentelemetry.semconv package yet. What should I do?

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.

2 participants