Skip to content

Commit

Permalink
fix: set service name and version
Browse files Browse the repository at this point in the history
  • Loading branch information
mati007thm committed Jan 12, 2024
1 parent aae8ccc commit 5032e17
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dapr-distributed-calendar/python/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from dapr.clients import DaprClient

from opentelemetry.sdk.resources import SERVICE_NAME, Resource
from opentelemetry.sdk.resources import SERVICE_NAME, SERVICE_VERSION, Resource

from opentelemetry import metrics
from opentelemetry.exporter.otlp.proto.grpc.metric_exporter import OTLPMetricExporter
Expand All @@ -16,7 +16,8 @@

# Service name is required for most backends
resource = Resource(attributes={
SERVICE_NAME: "your-service-name"
SERVICE_NAME: "messages",
SERVICE_VERSION: '0.1.0'
})

reader = PeriodicExportingMetricReader(
Expand Down

0 comments on commit 5032e17

Please sign in to comment.