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

fix otel custom provider sample #1136

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

ryota0624
Copy link

expose metrics require calling otel.SetMeterProvider(meterProvider)

before (none calling otel.SetMeterProvider(meterProvider))

1:01PM INF actor system started lib=Proto.Actor system=J8MjnjRbMnrMqwaRdKNLBg id=J8MjnjRbMnrMqwaRdKNLBg
{"Resource":[{"Key":"service.name","Value":{"Type":"STRING","Value":"test-service"}},{"Key":"service.version","Value":{"Type":"STRING","Value":"0.1.0"}},{"Key":"telemetry.sdk.language","Value":{"Type":"STRING","Value":"go"}},{"Key":"telemetry.sdk.name","Value":{"Type":"STRING","Value":"opentelemetry"}},{"Key":"telemetry.sdk.version","Value":{"Type":"STRING","Value":"1.22.0"}}],"ScopeMetrics":null}

after

1:01PM INF actor system started lib=Proto.Actor system=4zqzpEKUr5MvsLe7aHhdLg id=4zqzpEKUr5MvsLe7aHhdLg
Hello Stdout Exporter
{"Resource":[{"Key":"service.name","Value":{"Type":"STRING","Value":"test-service"}},{"Key":"service.version","Value":{"Type":"STRING","Value":"0.1.0"}},{"Key":"telemetry.sdk.language","Value":{"Type":"STRING","Value":"go"}},{"Key":"telemetry.sdk.name","Value":{"Type":"STRING","Value":"opentelemetry"}},{"Key":"telemetry.sdk.version","Value":{"Type":"STRING","Value":"1.22.0"}}],"ScopeMetrics":[{"Scope":{"Name":"protoactor","Version":"","SchemaURL":""},"Metrics":[{"Name":"protoactor_actor_message_receive_duration_seconds","Description":"Actor's messages received duration in seconds","Unit":"","Data":{"DataPoints":[{"Attributes":[{"Key":"actortype","Value":{"Type":"STRING","Value":"main.helloActor"}},{"Key":"address","Value":{"Type":"STRING","Value":"nonhost"}},{"Key":"messagetype","Value":{"Type":"STRING","Value":"*actor.Started"}}],"StartTime":"2025-01-03T13:01:49.9814+09:00","Time":"2025-01-03T13:01:52.979789+09:00","Count":1,"Bounds":[0,5,10,25,50,75,100,250,500,750,1000,2500,5000,7500,10000],"BucketCounts":[0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"Min":{},"Max":{},"Sum":0.000004958},{"Attributes":[{"Key":"actortype","Value":{"Type":"STRING","Value":"main.helloActor"}},{"Key":"address","Value":{"Type":"STRING","Value":"nonhost"}},{"Key":"messagetype","Value":{"Type":"STRING","Value":"*main.hello"}}],"StartTime":"2025-01-03T13:01:49.9814+09:00","Time":"2025-01-03T13:01:52.979789+09:00","Count":1,"Bounds":[0,5,10,25,50,75,100,250,500,750,1000,2500,5000,7500,10000],"BucketCounts":[0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"Min":{},"Max":{},"Sum":0.000003291}],"Temporality":"CumulativeTemporality"}},{"Name":"protoactor_actor_spawn_count","Description":"Number of actors spawn","Unit":"1","Data":{"DataPoints":[{"Attributes":[{"Key":"actortype","Value":{"Type":"STRING","Value":"main.helloActor"}},{"Key":"address","Value":{"Type":"STRING","Value":"nonhost"}}],"StartTime":"2025-01-03T13:01:49.981409+09:00","Time":"2025-01-03T13:01:52.979805+09:00","Value":1}],"Temporality":"CumulativeTemporality","IsMonotonic":true}}]}]}

@CLAassistant
Copy link

CLAassistant commented Jan 3, 2025

CLA assistant check
All committers have signed the CLA.

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