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
Show resolved
Hide resolved
...ext-opencensusexporter/src/opentelemetry/ext/opencensusexporter/metrics_exporter/__init__.py
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 |
...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_timestampfor stateful metricsstrwhen setting it in proto. The labels should all be strings, but this is currently only type-checked.Previously,
start_timestampwasn'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_timestampthat 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