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 support for OTLP export for internal metrics #8097

Merged
merged 3 commits into from
Jul 21, 2023

Conversation

codeboten
Copy link
Contributor

@codeboten codeboten commented Jul 17, 2023

Internal collector metrics can now be exported via OTLP
using the otel-go otlpgrpc and otlphttp exporters.

Closes #7641

Follow up to #8113

@codecov
Copy link

codecov bot commented Jul 17, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.05 🎉

Comparison is base (a1efc0e) 90.18% compared to head (b1d0f13) 90.24%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8097      +/-   ##
==========================================
+ Coverage   90.18%   90.24%   +0.05%     
==========================================
  Files         301      301              
  Lines       15377    15449      +72     
==========================================
+ Hits        13868    13942      +74     
+ Misses       1222     1221       -1     
+ Partials      287      286       -1     
Impacted Files Coverage Δ
service/internal/proctelemetry/config.go 96.75% <100.00%> (+2.06%) ⬆️
service/telemetry/config.go 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@TylerHelmuth TylerHelmuth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hype!

service/internal/proctelemetry/config.go Outdated Show resolved Hide resolved
Copy link
Contributor

@jaronoff97 jaronoff97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥳

opts := []otlpmetricgrpc.Option{}

if len(otlpConfig.Endpoint) > 0 {
opts = append(opts, otlpmetricgrpc.WithEndpoint(otlpConfig.Endpoint))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be a required option?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By default, if an environment variable is not set, and this option is not passed, "localhost:4317" will be used.

It is not required: https://pkg.go.dev/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc#WithEndpoint

@codeboten codeboten marked this pull request as ready for review July 18, 2023 19:25
@codeboten codeboten requested review from a team and Aneurysm9 July 18, 2023 19:25
Copy link
Member

@mx-psi mx-psi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments on the config. Since they were not added by this PR we may consider them separately if this is not the first use of those fields

service/internal/proctelemetry/config.go Outdated Show resolved Hide resolved
service/internal/proctelemetry/config.go Show resolved Hide resolved
service/internal/proctelemetry/config_test.go Show resolved Hide resolved
Alex Boten added 3 commits July 20, 2023 08:49
Signed-off-by: Alex Boten <aboten@lightstep.com>
Signed-off-by: Alex Boten <aboten@lightstep.com>
@codeboten codeboten merged commit 89f1e9f into open-telemetry:main Jul 21, 2023
29 checks passed
@codeboten codeboten deleted the codeboten/jul7-otlp branch July 21, 2023 14:42
@github-actions github-actions bot added this to the next release milestone Jul 21, 2023
codeboten pushed a commit that referenced this pull request Jul 21, 2023
This PR adds support for configuring batch span processor for internal
collector traces. It adds support to export them via the stdout
exporter.

Linked issue
#8106

Follows
#8097

Signed-off-by: Alex Boten <aboten@lightstep.com>
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.

Support additional exporters for exporting collector metrics
4 participants