-
Notifications
You must be signed in to change notification settings - Fork 1.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
[service] add resource attributes as labels to otel metrics #9029
Merged
codeboten
merged 3 commits into
open-telemetry:main
from
codeboten:codeboten/enable-otel-by-default
Dec 1, 2023
Merged
[service] add resource attributes as labels to otel metrics #9029
codeboten
merged 3 commits into
open-telemetry:main
from
codeboten:codeboten/enable-otel-by-default
Dec 1, 2023
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
This ensures backwards compatibility with OpenCensus metrics. Signed-off-by: Alex Boten <[email protected]>
Signed-off-by: Alex Boten <[email protected]>
Signed-off-by: Alex Boten <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #9029 +/- ##
=======================================
Coverage 91.57% 91.57%
=======================================
Files 316 316
Lines 17146 17147 +1
=======================================
+ Hits 15701 15702 +1
Misses 1150 1150
Partials 295 295 ☔ View full report in Codecov by Sentry. |
dmitryax
approved these changes
Dec 1, 2023
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.
🎉
pantuza
pushed a commit
to pantuza/opentelemetry-collector
that referenced
this pull request
Dec 8, 2023
…emetry#9029) This ensures backwards compatibility with OpenCensus metrics. ### Collector metrics with OpenCensus: ``` # HELP otelcol_exporter_queue_capacity Fixed capacity of the retry queue (in batches) # TYPE otelcol_exporter_queue_capacity gauge otelcol_exporter_queue_capacity{exporter="otlp",service_instance_id="e46d41fd-810a-4685-82d0-b01e177cfe7b",service_name="otelcorecol",service_version="0.90.0-dev"} 1000 # HELP otelcol_exporter_queue_size Current size of the retry queue (in batches) # TYPE otelcol_exporter_queue_size gauge otelcol_exporter_queue_size{exporter="otlp",service_instance_id="e46d41fd-810a-4685-82d0-b01e177cfe7b",service_name="otelcorecol",service_version="0.90.0-dev"} 0 # HELP otelcol_process_cpu_seconds Total CPU user and system time in seconds # TYPE otelcol_process_cpu_seconds counter otelcol_process_cpu_seconds{service_instance_id="e46d41fd-810a-4685-82d0-b01e177cfe7b",service_name="otelcorecol",service_version="0.90.0-dev"} 0.03 # HELP otelcol_process_memory_rss Total physical memory (resident set size) # TYPE otelcol_process_memory_rss gauge otelcol_process_memory_rss{service_instance_id="e46d41fd-810a-4685-82d0-b01e177cfe7b",service_name="otelcorecol",service_version="0.90.0-dev"} 2.70336e+07 # HELP otelcol_process_runtime_heap_alloc_bytes Bytes of allocated heap objects (see 'go doc runtime.MemStats.HeapAlloc') # TYPE otelcol_process_runtime_heap_alloc_bytes gauge otelcol_process_runtime_heap_alloc_bytes{service_instance_id="e46d41fd-810a-4685-82d0-b01e177cfe7b",service_name="otelcorecol",service_version="0.90.0-dev"} 2.445496e+06 # HELP otelcol_process_runtime_total_alloc_bytes Cumulative bytes allocated for heap objects (see 'go doc runtime.MemStats.TotalAlloc') # TYPE otelcol_process_runtime_total_alloc_bytes counter otelcol_process_runtime_total_alloc_bytes{service_instance_id="e46d41fd-810a-4685-82d0-b01e177cfe7b",service_name="otelcorecol",service_version="0.90.0-dev"} 3.96812e+06 # HELP otelcol_process_runtime_total_sys_memory_bytes Total bytes of memory obtained from the OS (see 'go doc runtime.MemStats.Sys') # TYPE otelcol_process_runtime_total_sys_memory_bytes gauge otelcol_process_runtime_total_sys_memory_bytes{service_instance_id="e46d41fd-810a-4685-82d0-b01e177cfe7b",service_name="otelcorecol",service_version="0.90.0-dev"} 1.3601808e+07 # HELP otelcol_process_uptime Uptime of the process # TYPE otelcol_process_uptime counter otelcol_process_uptime{service_instance_id="e46d41fd-810a-4685-82d0-b01e177cfe7b",service_name="otelcorecol",service_version="0.90.0-dev"} 22.446733 ``` ### Collector metrics w/ `useOtelForInternalMetrics` before my this change ``` # HELP otelcol_exporter_queue_capacity Fixed capacity of the retry queue (in batches) # TYPE otelcol_exporter_queue_capacity gauge otelcol_exporter_queue_capacity{exporter="otlp"} 1000 # HELP otelcol_exporter_queue_size Current size of the retry queue (in batches) # TYPE otelcol_exporter_queue_size gauge otelcol_exporter_queue_size{exporter="otlp"} 0 # HELP otelcol_process_cpu_seconds Total CPU user and system time in seconds # TYPE otelcol_process_cpu_seconds counter otelcol_process_cpu_seconds 0.06 # HELP otelcol_process_memory_rss Total physical memory (resident set size) # TYPE otelcol_process_memory_rss gauge otelcol_process_memory_rss 2.9605888e+07 # HELP otelcol_process_runtime_heap_alloc_bytes Bytes of allocated heap objects (see 'go doc runtime.MemStats.HeapAlloc') # TYPE otelcol_process_runtime_heap_alloc_bytes gauge otelcol_process_runtime_heap_alloc_bytes 3.42064e+06 # HELP otelcol_process_runtime_total_alloc_bytes Cumulative bytes allocated for heap objects (see 'go doc runtime.MemStats.TotalAlloc') # TYPE otelcol_process_runtime_total_alloc_bytes counter otelcol_process_runtime_total_alloc_bytes 4.931072e+06 # HELP otelcol_process_runtime_total_sys_memory_bytes Total bytes of memory obtained from the OS (see 'go doc runtime.MemStats.Sys') # TYPE otelcol_process_runtime_total_sys_memory_bytes gauge otelcol_process_runtime_total_sys_memory_bytes 1.2815376e+07 # HELP otelcol_process_uptime Uptime of the process # TYPE otelcol_process_uptime counter otelcol_process_uptime 21.149825 # HELP target_info Target metadata # TYPE target_info gauge target_info{service_instance_id="6ca6db28-5a67-419b-8f0a-a486bba59833",service_name="otelcorecol",service_version="0.90.0-dev"} 1 ``` ### With the change in this PR and using `useOtelForInternalMetrics` ``` # HELP otelcol_exporter_queue_capacity Fixed capacity of the retry queue (in batches) # TYPE otelcol_exporter_queue_capacity gauge otelcol_exporter_queue_capacity{exporter="otlp",service_instance_id="40f4a782-e5ee-47e1-acd0-17cb90bd16f1",service_name="otelcorecol",service_version="0.90.0-dev"} 1000 # HELP otelcol_exporter_queue_size Current size of the retry queue (in batches) # TYPE otelcol_exporter_queue_size gauge otelcol_exporter_queue_size{exporter="otlp",service_instance_id="40f4a782-e5ee-47e1-acd0-17cb90bd16f1",service_name="otelcorecol",service_version="0.90.0-dev"} 0 # HELP otelcol_process_cpu_seconds Total CPU user and system time in seconds # TYPE otelcol_process_cpu_seconds counter otelcol_process_cpu_seconds{service_instance_id="40f4a782-e5ee-47e1-acd0-17cb90bd16f1",service_name="otelcorecol",service_version="0.90.0-dev"} 0.03 # HELP otelcol_process_memory_rss Total physical memory (resident set size) # TYPE otelcol_process_memory_rss gauge otelcol_process_memory_rss{service_instance_id="40f4a782-e5ee-47e1-acd0-17cb90bd16f1",service_name="otelcorecol",service_version="0.90.0-dev"} 2.7508736e+07 # HELP otelcol_process_runtime_heap_alloc_bytes Bytes of allocated heap objects (see 'go doc runtime.MemStats.HeapAlloc') # TYPE otelcol_process_runtime_heap_alloc_bytes gauge otelcol_process_runtime_heap_alloc_bytes{service_instance_id="40f4a782-e5ee-47e1-acd0-17cb90bd16f1",service_name="otelcorecol",service_version="0.90.0-dev"} 2.450768e+06 # HELP otelcol_process_runtime_total_alloc_bytes Cumulative bytes allocated for heap objects (see 'go doc runtime.MemStats.TotalAlloc') # TYPE otelcol_process_runtime_total_alloc_bytes counter otelcol_process_runtime_total_alloc_bytes{service_instance_id="40f4a782-e5ee-47e1-acd0-17cb90bd16f1",service_name="otelcorecol",service_version="0.90.0-dev"} 3.97064e+06 # HELP otelcol_process_runtime_total_sys_memory_bytes Total bytes of memory obtained from the OS (see 'go doc runtime.MemStats.Sys') # TYPE otelcol_process_runtime_total_sys_memory_bytes gauge otelcol_process_runtime_total_sys_memory_bytes{service_instance_id="40f4a782-e5ee-47e1-acd0-17cb90bd16f1",service_name="otelcorecol",service_version="0.90.0-dev"} 1.3339664e+07 # HELP otelcol_process_uptime Uptime of the process # TYPE otelcol_process_uptime counter otelcol_process_uptime{service_instance_id="40f4a782-e5ee-47e1-acd0-17cb90bd16f1",service_name="otelcorecol",service_version="0.90.0-dev"} 3.938331 # HELP target_info Target metadata # TYPE target_info gauge target_info{service_instance_id="40f4a782-e5ee-47e1-acd0-17cb90bd16f1",service_name="otelcorecol",service_version="0.90.0-dev"} 1 ``` --------- Signed-off-by: Alex Boten <[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.
This ensures backwards compatibility with OpenCensus metrics.
Collector metrics with OpenCensus:
Collector metrics w/
useOtelForInternalMetrics
before my this changeWith the change in this PR and using
useOtelForInternalMetrics