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

Add integration test with metrics from the prometheus receiver #348

Merged
merged 1 commit into from
Apr 12, 2022

Conversation

dashpole
Copy link
Contributor

@dashpole dashpole commented Apr 8, 2022

It is generated by scraping the opentelemetry-go's prometheus example: https://github.com/open-telemetry/opentelemetry-go/blob/main/example/prometheus/main.go

I mostly wanted to make sure we have an example that uses a histogram, which we didn't previously have.

@dashpole dashpole marked this pull request as ready for review April 8, 2022 20:22
@dashpole dashpole requested review from aabmass and damemi April 8, 2022 20:22
@dashpole
Copy link
Contributor Author

this is ready for review

@dashpole
Copy link
Contributor Author

dashpole commented Apr 11, 2022

Note to self: fix this error.

{"level":"error","ts":1649711917.6179736,"caller":"collector/metrics.go:292","msg":"Unable to send metric descriptor.","error":"rpc error: code = InvalidArgument desc = Field metricDescriptor.labels[3].key had an invalid value of \"service_name\": Duplicate label key encountered.","metric_descriptor":"name:\"ex_com_one\" type:\"workload.googleapis.com/ex_com_one\" labels:{key:\"service_name\"} labels:{key:\"service_instance_id\"} labels:{key:\"ex_com_lemons\"} labels:{key:\"service_name\"} labels:{key:\"telemetry_sdk_language\"} labels:{key:\"telemetry_sdk_name\"} labels:{key:\"telemetry_sdk_version\"} labels:{key:\"A\"} labels:{key:\"B\"} labels:{key:\"C\"} metric_kind:GAUGE value_type:DOUBLE display_name:\"ex_com_one\"","stacktrace":"github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector.(*MetricsExporter).exportMetricDescriptor\n\t/workspace/exporter/collector/metrics.go:292\ngithub.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector.(*MetricsExporter).exportMetricDescriptorRunner\n\t/workspace/exporter/collector/metrics.go:262"}
{"level":"error","ts":1649711917.6435902,"caller":"collector/metrics.go:292","msg":"Unable to send metric descriptor.","error":"rpc error: code = InvalidArgument desc = Field metricDescriptor.labels[3].key had an invalid value of \"service_name\": Duplicate label key encountered.","metric_descriptor":"name:\"ex_com_two\" type:\"workload.googleapis.com/ex_com_two\" labels:{key:\"service_name\"} labels:{key:\"service_instance_id\"} labels:{key:\"ex_com_lemons\"} labels:{key:\"service_name\"} labels:{key:\"telemetry_sdk_language\"} labels:{key:\"telemetry_sdk_name\"} labels:{key:\"telemetry_sdk_version\"} labels:{key:\"A\"} labels:{key:\"B\"} labels:{key:\"C\"} metric_kind:CUMULATIVE value_type:DISTRIBUTION display_name:\"ex_com_two\"","stacktrace":"github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector.(*MetricsExporter).exportMetricDescriptor\n\t/workspace/exporter/collector/metrics.go:292\ngithub.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector.(*MetricsExporter).exportMetricDescriptorRunner\n\t/workspace/exporter/collector/metrics.go:262"}

Done. Opened #352 to track addressing the underlying issue.

@dashpole dashpole merged commit 9f31be1 into GoogleCloudPlatform:main Apr 12, 2022
@dashpole dashpole deleted the add_prom_testcase branch April 12, 2022 20:31
damemi added a commit that referenced this pull request Apr 20, 2022
* Do not use IsZero on timestamps obtained from pdata (#336)

* do not use IsZero on timestamps obtained from pdata

* send summary counts as doubles instead of integers (#338)

* drop data points with no value set (#339)

* handle NaN sums in histograms and exponential histograms (#340)

* Fix broken links, typos in docs (#345)

* Update fixtures based on upstream changes to the prometheus receiver (#346)

* update fixtures based on upstream changes to the prometheus receiver

* feat(propagator): create a new one-way propagator (#343)

* feat(propagator): create a new one-way propagator

CloudTraceOneWayPropagator moves trace info from X-cloud-trace-context
into 'traceparent'.

* Apply suggestions from code review

Co-authored-by: David Ashpole <[email protected]>

* Update propagator to extract both, emit only traceparent

Users will no longer need to create a composite propagator, and there's
a clear precedence order between trace headers.

Co-authored-by: David Ashpole <[email protected]>

* Demonstrate that integration tests aren't catching failures (#349)

* demonstrate that integration tests aren't catching failures

* Update dependencies (#347)

update dependencies

* address remaining nits from #347 (#351)

* prepare for release (#353)

* add integration test with metrics from the prometheus receiver (#348)

* add make commands for release (#354)

* Send timeseries synchronously (#358)

* send timeseries syncronously

* update docs, and fix existing broken test

* Drop histograms without a sum (#359)

* update opentelemetry collector to v0.49.0

* drop histograms without a sum

* Update logging export to use new v0.49 types

Co-authored-by: David Ashpole <[email protected]>
Co-authored-by: Marc Dougherty <[email protected]>
damemi added a commit that referenced this pull request Apr 29, 2022
* Do not use IsZero on timestamps obtained from pdata (#336)

* do not use IsZero on timestamps obtained from pdata

* send summary counts as doubles instead of integers (#338)

* drop data points with no value set (#339)

* handle NaN sums in histograms and exponential histograms (#340)

* Fix broken links, typos in docs (#345)

* Update fixtures based on upstream changes to the prometheus receiver (#346)

* update fixtures based on upstream changes to the prometheus receiver

* feat(propagator): create a new one-way propagator (#343)

* feat(propagator): create a new one-way propagator

CloudTraceOneWayPropagator moves trace info from X-cloud-trace-context
into 'traceparent'.

* Apply suggestions from code review

Co-authored-by: David Ashpole <[email protected]>

* Update propagator to extract both, emit only traceparent

Users will no longer need to create a composite propagator, and there's
a clear precedence order between trace headers.

Co-authored-by: David Ashpole <[email protected]>

* Demonstrate that integration tests aren't catching failures (#349)

* demonstrate that integration tests aren't catching failures

* Update dependencies (#347)

update dependencies

* address remaining nits from #347 (#351)

* prepare for release (#353)

* add integration test with metrics from the prometheus receiver (#348)

* add make commands for release (#354)

* Send timeseries synchronously (#358)

* send timeseries syncronously

* update docs, and fix existing broken test

* Drop histograms without a sum (#359)

* update opentelemetry collector to v0.49.0

* drop histograms without a sum

* Add sum of squared deviation estimate (#341)

* add sum of squared deviation estimate

* Add missing otel attributes to Spans exported to Cloud Trace (#365)

* Add instrumentation library to span attributes.

* Add test to ensure resource + instrumentation-scope labels show up in spans.

* Expand testing.

* Move resource mapping into shared module, and add monitored resource labels to trace spans.

* Do the go mod tidy shuffle.

* Fix docker build to include new shared module.

* Bump back to go 1.17

* Migrate to SDK version of semantic convention constants instead of Collector's.

* Clean up documents.

* Normalize histograms, summaries, and exponential histograms (#360)

* normalize remaining cumulative data points

* use the timeout passed to the metrics exporter (#369)

* make gotidy

* Resolve conflicts from missed file

Co-authored-by: David Ashpole <[email protected]>
Co-authored-by: Marc Dougherty <[email protected]>
Co-authored-by: Josh Suereth <[email protected]>
damemi added a commit that referenced this pull request Apr 29, 2022
* Do not use IsZero on timestamps obtained from pdata (#336)

* do not use IsZero on timestamps obtained from pdata

* send summary counts as doubles instead of integers (#338)

* drop data points with no value set (#339)

* handle NaN sums in histograms and exponential histograms (#340)

* Fix broken links, typos in docs (#345)

* Update fixtures based on upstream changes to the prometheus receiver (#346)

* update fixtures based on upstream changes to the prometheus receiver

* feat(propagator): create a new one-way propagator (#343)

* feat(propagator): create a new one-way propagator

CloudTraceOneWayPropagator moves trace info from X-cloud-trace-context
into 'traceparent'.

* Apply suggestions from code review

Co-authored-by: David Ashpole <[email protected]>

* Update propagator to extract both, emit only traceparent

Users will no longer need to create a composite propagator, and there's
a clear precedence order between trace headers.

Co-authored-by: David Ashpole <[email protected]>

* Demonstrate that integration tests aren't catching failures (#349)

* demonstrate that integration tests aren't catching failures

* Update dependencies (#347)

update dependencies

* address remaining nits from #347 (#351)

* prepare for release (#353)

* add integration test with metrics from the prometheus receiver (#348)

* add make commands for release (#354)

* Send timeseries synchronously (#358)

* send timeseries syncronously

* update docs, and fix existing broken test

* Drop histograms without a sum (#359)

* update opentelemetry collector to v0.49.0

* drop histograms without a sum

* Add sum of squared deviation estimate (#341)

* add sum of squared deviation estimate

* Add missing otel attributes to Spans exported to Cloud Trace (#365)

* Add instrumentation library to span attributes.

* Add test to ensure resource + instrumentation-scope labels show up in spans.

* Expand testing.

* Move resource mapping into shared module, and add monitored resource labels to trace spans.

* Do the go mod tidy shuffle.

* Fix docker build to include new shared module.

* Bump back to go 1.17

* Migrate to SDK version of semantic convention constants instead of Collector's.

* Clean up documents.

* Normalize histograms, summaries, and exponential histograms (#360)

* normalize remaining cumulative data points

* use the timeout passed to the metrics exporter (#369)

Co-authored-by: David Ashpole <[email protected]>
Co-authored-by: Marc Dougherty <[email protected]>
Co-authored-by: Josh Suereth <[email protected]>
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