Repository navigation
Add logfire.configure(environment=...) - #557
Conversation
Deploying logfire-docs with
|
| Latest commit: |
0aed79e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e6b4b884.logfire-docs.pages.dev |
| Branch Preview URL: | https://add-environment-configuratio.logfire-docs.pages.dev |
| if self.service_version: | ||
| otel_resource_attributes[ResourceAttributes.SERVICE_VERSION] = self.service_version | ||
| if self.environment: | ||
| otel_resource_attributes[RESOURCE_ATTRIBUTES_DEPLOYMENT_ENVIRONMENT_NAME] = self.environment |
There was a problem hiding this comment.
It's unfortunate that ResourceAttributes.DEPLOYMENT_ENVIRONMENT exists, but ResourceAttributes.DEPLOYMENT_ENVIRONMENT_NAME doesn't. And the first is deprecated...
There was a problem hiding this comment.
Maybe open an otel issue? And put this link in code.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #557 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 133 133
Lines 10214 10227 +13
Branches 1396 1397 +1
=========================================
+ Hits 10214 10227 +13 ☔ View full report in Codecov by Sentry. |
f63b4d2 to
7f39490
Compare
7f39490 to
3d325c8
Compare
| service_name: Name of this service. Defaults to the `LOGFIRE_SERVICE_NAME` environment variable. | ||
| service_version: Version of this service. Defaults to the `LOGFIRE_SERVICE_VERSION` environment variable, or the | ||
| current git commit hash if available. | ||
| environment: The environment this service is running in. Defaults to the `LOGFIRE_ENVIRONMENT` environment variable. |
There was a problem hiding this comment.
| environment: The environment this service is running in. Defaults to the `LOGFIRE_ENVIRONMENT` environment variable. | |
| environment: The environment this service is running in, e.g. `'staging'` or `'prod'`. Sets the `deployment.environment.name` resource attribute. Useful for filtering within projects in the Logfire UI. Defaults to the `LOGFIRE_ENVIRONMENT` environment variable. |
but with newlines
| if self.service_version: | ||
| otel_resource_attributes[ResourceAttributes.SERVICE_VERSION] = self.service_version | ||
| if self.environment: | ||
| otel_resource_attributes[RESOURCE_ATTRIBUTES_DEPLOYMENT_ENVIRONMENT_NAME] = self.environment |
There was a problem hiding this comment.
Maybe open an otel issue? And put this link in code.
Co-authored-by: Alex Hall <alex.mojaki@gmail.com>
| Defaults to the `LOGFIRE_TOKEN` environment variable. | ||
| service_name: Name of this service. |
There was a problem hiding this comment.
| Defaults to the `LOGFIRE_TOKEN` environment variable. | |
| service_name: Name of this service. | |
| Defaults to the `LOGFIRE_TOKEN` environment variable. | |
| service_name: Name of this service. |
can we do this to make it more readable? otherwise it's confusing which lines are grouped together.
No description provided.