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

feat(server): Track metrics for OpenTelemetry events #1618

Merged
merged 2 commits into from
Nov 23, 2022

Conversation

AbhiPrasad
Copy link
Member

@AbhiPrasad AbhiPrasad commented Nov 21, 2022

fixes #1615

This PR adds a statsd metric for OpenTelemetry events. It allows us to see at a high level the volume of OpenTelemetry and what SDKs they are being sent from.

@AbhiPrasad AbhiPrasad self-assigned this Nov 21, 2022
Base automatically changed from abhi-otel-context to master November 22, 2022 13:25
@AbhiPrasad AbhiPrasad marked this pull request as ready for review November 22, 2022 16:53
@AbhiPrasad AbhiPrasad requested a review from a team November 22, 2022 16:53
Copy link
Contributor

@iker-barriocanal iker-barriocanal left a comment

Choose a reason for hiding this comment

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

A couple of questions to better understand the intention, not blocking.

.and_then(Annotated::value);

if otel_context.is_some() {
metric!(
Copy link
Contributor

Choose a reason for hiding this comment

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

Collecting the metrics in finalize_event means you'll get metrics for events relay drops as part of light normalization), is this your intention?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes this was my intention, the same as transaction source metrics we are collecting.

This will be the estimate we use to understand the consequences of doing more complicated processing of opentelemetry events in Relay, details of which we will share with the Ingest team very soon.

.and_then(Annotated::value);

if otel_context.is_some() {
metric!(
Copy link
Contributor

Choose a reason for hiding this comment

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

How many OTel events (and metrics) are we expecting, and how big is the cardinality of these counters (are most events coming from the same SDK) are in the statsd client in relay? If the number is not large it's ok. My concern is that we've been in the maximum threshold before, and the additional metrics are dropped.

Copy link
Member Author

Choose a reason for hiding this comment

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

We should be consuming at the same volume as transaction source information, which is set above in RelayCounters::EventTransactionSource with the same cardinality, and we've been able to manage that fine.

Most events should come from 4 SDKs atm (Node, Java, Python, Ruby), so it's even less than transaction source at the moment.

@AbhiPrasad AbhiPrasad merged commit 8f65714 into master Nov 23, 2022
@AbhiPrasad AbhiPrasad deleted the abhi-otel-counter branch November 23, 2022 10:17
jan-auer added a commit that referenced this pull request Nov 24, 2022
* master:
  ref(system): Introduce a generic recipient type (#1622)
  feat(transaction): Normalize transaction name (#1621)
  feat(server): Track metrics for OpenTelemetry events (#1618)
  bug(replays): Increase reserved space in payload chunks (#1601)
  feat(protocol): Add OpenTelemetry Context (#1617)
jan-auer added a commit that referenced this pull request Nov 24, 2022
* master:
  chore(toolchain): Fix lint and test for beta toolchain (#1623)
  ref(system): Introduce a generic recipient type (#1622)
  feat(transaction): Normalize transaction name (#1621)
  feat(server): Track metrics for OpenTelemetry events (#1618)
  bug(replays): Increase reserved space in payload chunks (#1601)
  feat(protocol): Add OpenTelemetry Context (#1617)
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.

Add OpenTelemetry metrics to Relay
3 participants