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

Otel exporter for internal telemetry #11470

Merged
merged 15 commits into from
Aug 28, 2023
Merged

Otel exporter for internal telemetry #11470

merged 15 commits into from
Aug 28, 2023

Conversation

dmathieu
Copy link
Member

@dmathieu dmathieu commented Aug 23, 2023

Motivation/summary

This sets up an OpenTelemetry exporter to collect internal metrics, export them as internal APM events and send them to the processor.

It is the boilerplate for #10623, yet no metrics are emitted yet. So this code isn't used at the moment.

Checklist

For functional changes, consider:

  • Is it observable through the addition of either logging or metrics?
  • Is its use being published in telemetry to enable product improvement?
  • Have system tests been added to avoid regression?

How to test these changes

This PR is unit-tested.

Related issues

@dmathieu dmathieu requested a review from a team as a code owner August 23, 2023 12:22
@dmathieu dmathieu force-pushed the otel-metric-exporter branch from 0de00c1 to 1a424e4 Compare August 23, 2023 12:23
@mergify
Copy link
Contributor

mergify bot commented Aug 23, 2023

This pull request does not have a backport label. Could you fix it @dmathieu? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-7.17 is the label to automatically backport to the 7.17 branch.
  • backport-8./d is the label to automatically backport to the 8./d branch. /d is the digit.

NOTE: backport-skip has been added to this pull request.

@mergify mergify bot added the backport-skip Skip notification from the automated backport with mergify label Aug 23, 2023
@dmathieu dmathieu force-pushed the otel-metric-exporter branch from ce00b94 to 5febde7 Compare August 23, 2023 12:40
internal/telemetry/metric_exporter.go Outdated Show resolved Hide resolved
internal/telemetry/metric_exporter_config.go Show resolved Hide resolved
Copy link
Member

@axw axw left a comment

Choose a reason for hiding this comment

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

I didn't look too closely at the modelpb usage, just the overall structure. Looks good, just a few comments.

internal/telemetry/metric_exporter_config.go Show resolved Hide resolved
internal/telemetry/metric_exporter.go Outdated Show resolved Hide resolved
internal/telemetry/metric_exporter.go Show resolved Hide resolved
@dmathieu dmathieu requested a review from kruskall August 25, 2023 08:36
@dmathieu dmathieu force-pushed the otel-metric-exporter branch from 7d9d543 to f7c94a0 Compare August 25, 2023 14:44
@dmathieu
Copy link
Member Author

dmathieu commented Aug 25, 2023

I have added the new exporter to the global meter provider.
It won't do anything yet, since we don't have any metric being emitted. So I'm not adding a changelog entry yet.

@dmathieu dmathieu enabled auto-merge (squash) August 28, 2023 07:44
@dmathieu dmathieu merged commit 0fe0fcf into main Aug 28, 2023
@dmathieu dmathieu deleted the otel-metric-exporter branch August 28, 2023 08:04
bmorelli25 pushed a commit to bmorelli25/apm-server that referenced this pull request Sep 5, 2023
* setup otel metric exporter

* handle float counter

* handle int64 counter and gauges

* add histograms

* handle labels

* use our custom boundaries

* extract and test config

* filter metrics

* run check-full

* document the specific boundaries

* initialize new structs, instead of cloning

* mention apm-data

* remove agent

* add local exporter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-skip Skip notification from the automated backport with mergify
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants