Skip to content

Include Stage name in emitted metrics and dashboards #1488

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

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

AndreKurait
Copy link
Member

@AndreKurait AndreKurait commented Apr 29, 2025

Description

Add stage name to metrics with trace sampling.

Fix dependency ordering with otel collector and service container, fixes otel sdk connection error during task shutdown / startup when the service is running without the collector.

Issues Resolved

https://opensearch.atlassian.net/browse/MIGRATIONS-1949

Testing

Verified metrics with dimension and dashboards in jenkins environment

C&R Dashboard Example:
image

Check List

  • New functionality includes testing
  • Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@AndreKurait AndreKurait marked this pull request as ready for review April 29, 2025 14:15
action: delete
- key: telemetry.sdk.name
action: delete
- key: telemetry.sdk.version
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think that I'm fine with this, but it also seems like it might be a premature optimization. Won't they generally be the same value until there was an upgrade? If there was an upgrade, numbers could be slightly off - and it would be good to know that this is why. That said, there are plenty of other data provenance values that are not included in these metric dimensions.

Copy link
Member Author

Choose a reason for hiding this comment

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

This drastically simplified the changes to the dashboards, by only adding qualifer instead of the other attributes as dimensions. I'd prefer to keep this for now and later add back in.

Signed-off-by: Andre Kurait <[email protected]>
awsxray:
index_all_attributes: true
service:
extensions: [health_check]
pipelines:
metrics:
receivers: [otlp]
processors: [batch]
processors: [cumulativetodelta, resource/metrics, batch]
Copy link
Collaborator

Choose a reason for hiding this comment

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

What do we mean by adding these?

Copy link
Member Author

Choose a reason for hiding this comment

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

This adds in the qualifier attribute with resource/metrics and cumulativetodelta converts cumulative metrics to delta such as histogram which show the total aggregate since a process was started to just the delta in the last minute

@AndreKurait AndreKurait temporarily deployed to migrations-cicd May 7, 2025 01:25 — with GitHub Actions Inactive
@AndreKurait AndreKurait changed the title Otel config Include Stage name in emitted metrics and dashboards May 7, 2025
@@ -58,6 +63,10 @@ export class OtelCollectorSidecar {
}
});
taskDefinition.addToTaskRolePolicy(createAwsDistroForOtelPushInstrumentationPolicy());
taskDefinition.defaultContainer?.addContainerDependencies({
Copy link
Member Author

Choose a reason for hiding this comment

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

Fixes Failed to export metrics observed during normal deployment cycle

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.

3 participants