-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Olivierg/gateway usage gauge #37499
Merged
songy23
merged 19 commits into
open-telemetry:main
from
ogaca-dd:olivierg/gateway-usage-gauge
Feb 7, 2025
Merged
Olivierg/gateway usage gauge #37499
songy23
merged 19 commits into
open-telemetry:main
from
ogaca-dd:olivierg/gateway-usage-gauge
Feb 7, 2025
+369
−230
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
songy23
reviewed
Jan 27, 2025
songy23
reviewed
Jan 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a changelog too
ogaca-dd
added a commit
to DataDog/datadog-agent
that referenced
this pull request
Feb 3, 2025
…collector-contrib into olivierg/gateway-usage-gauge
|
1 task
…tsprocessor version
…collector-contrib into olivierg/gateway-usage-gauge
…NLogs" TestLogsExporter creates a DatadogLogServerMock which assumes that every request type are "log". As hosts is empty in exportUsageMetrics, sends the series only if it is not empty solve the issue.
songy23
reviewed
Feb 7, 2025
songy23
approved these changes
Feb 7, 2025
chengchuanpeng
pushed a commit
to chengchuanpeng/opentelemetry-collector-contrib
that referenced
this pull request
Feb 8, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description This PR adds a new gauge metric `datadog.otel.gateway`. This metric is set at `1` when the collector is used as a gateway otherwise, the value is `0`. If `datadog.host.name` was sent with two different values, then the collector is used as a gateway. Note: [The PR on opentelemetry-mapping-go](DataDog/opentelemetry-mapping-go#479) should be merged before this PR and `go.mod` must use a commit on main instead of `0.24.1-0.20250124131402-bcd6fd1617a6` Associated PRs: - DataDog/opentelemetry-mapping-go#479 - DataDog/datadog-agent#33370 <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes <!--Describe what testing was performed and which tests were added.--> #### Testing The following commands generates the metric `datadog.otel.gateway` at `1` ``` telemetrygen metrics --otlp-insecure --otlp-attributes "datadog.host.name"=\"host1\" telemetrygen metrics --otlp-insecure --otlp-attributes "datadog.host.name"=\"host2\" ``` Same tests were performed for `traces` and for `logs` when `isLogsAgentExporterEnabled` is false. <!--Describe the documentation added.--> #### Documentation <!--Please delete paragraphs that you did not use before submitting.--> --------- Co-authored-by: Yang Song <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a new gauge metric
datadog.otel.gateway
. This metric is set at1
when the collector is used as a gateway otherwise, the value is0
.If
datadog.host.name
was sent with two different values, then the collector is used as a gateway.Note: The PR on opentelemetry-mapping-go should be merged before this PR and
go.mod
must use a commit on main instead of0.24.1-0.20250124131402-bcd6fd1617a6
Associated PRs:
Link to tracking issue
Fixes
Testing
The following commands generates the metric
datadog.otel.gateway
at1
Same tests were performed for
traces
and forlogs
whenisLogsAgentExporterEnabled
is false.Documentation