-
Notifications
You must be signed in to change notification settings - Fork 624
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
OC Exporter - send start_timestamp, resource labels, and convert labels to strings #937
Conversation
401037e
to
d06c3a7
Compare
1866849
to
e044ea8
Compare
- Pass start_timestamp to the timeseries in OC exporter for stateful metrics - Convert label values to strings, just in case
What does "start time" mean? When the metric is recorded or exported? Does it only make sense for non-stateful instruments? EDIT: From the specs: "The time when the cumulative valuewas reset to zero." So this leads me to believe that it is upon export time. Wouldn't the exporter be responsible for this value then instead of the metric/aggregator/batcher?
What would |
...ext-opencensusexporter/src/opentelemetry/ext/opencensusexporter/metrics_exporter/__init__.py
Outdated
Show resolved
Hide resolved
...ext-opencensusexporter/src/opentelemetry/ext/opencensusexporter/metrics_exporter/__init__.py
Outdated
Show resolved
Hide resolved
By "upon export time" do you mean from whenever the exporter started up? That's what I'm sending for stateful metrics
That is my understanding, although the docstring in the proto file makes it sound likes this is done automatically: "If not specified, the backend can use the previous recorded value." |
...ext-opencensusexporter/src/opentelemetry/ext/opencensusexporter/metrics_exporter/__init__.py
Outdated
Show resolved
Hide resolved
Ahh sorry I misunderstood what you meant by start time. Forget this question.
I asked this originally to address this. I'm not sure if starttime should be part of the aggregator/batcher? Wouldn't it make sense for it to be just part of the exporter when it is instantiated/first exported? |
@lzchen, I am going with when the exporter was instantiated for now. I think this is as accurate as we can get without adding a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just minor comments
...metry-exporter-opencensus/src/opentelemetry/exporter/opencensus/metrics_exporter/__init__.py
Outdated
Show resolved
Hide resolved
...metry-exporter-opencensus/src/opentelemetry/exporter/opencensus/metrics_exporter/__init__.py
Show resolved
Hide resolved
* fix: Jaeger propagator example of usage * fix: Jaeger propagator example of usage
Fixes #940, fixes #951.
start_timestamp
for stateful metricsstr
when setting it in proto. The labels should all be strings, but this is currently only type-checked.Previously,
start_timestamp
wasn't being passed at all. For metrics that are cumulative over the life of the process, the exporter should be sending a start time since startup. The docstring for this start_timestamp:The OpenCensus to OpenCensus Agent exporter sends the
start_timestamp
that is attached to each series, but OT doesn't store the start time in the aggregator or batcher AFAIK. I feel like this should be added, but we are waiting for the SDK specification still.Questions