otel-utils 0.5.0__tar.gz → 0.7.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of otel-utils might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: otel-utils
3
- Version: 0.5.0
3
+ Version: 0.7.0
4
4
  Summary: Utilidades simplificadas para instrumentación con OpenTelemetry
5
5
  License: Proprietary
6
6
  Author: Harold Portocarrero
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "otel-utils"
3
- version = "0.5.0"
3
+ version = "0.7.0"
4
4
  description = "Utilidades simplificadas para instrumentación con OpenTelemetry"
5
5
  authors = ["Harold Portocarrero <harold@getcometa.com>"]
6
6
  readme = "README.md"
@@ -177,7 +177,10 @@ class OtelConfigurator:
177
177
  meter_provider=metrics.get_meter_provider(),
178
178
  )
179
179
 
180
- self.structured_logger = StructuredLogger(self.config.service_name)
180
+ self.structured_logger = StructuredLogger(
181
+ self.config.service_name,
182
+ default_attributes={"env": self.config.environment}
183
+ )
181
184
  self.logger = self.structured_logger.logger
182
185
 
183
186
  self.logger.propagate = False
@@ -90,6 +90,8 @@ class StructuredLogger:
90
90
  "service_name": self.service_name
91
91
  }
92
92
 
93
+ extra_data.update(self.default_attributes)
94
+
93
95
  if operation:
94
96
  extra_data["operation"] = operation
95
97
 
File without changes