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

[exporterhelper] Add data_type attribute to internal queue metrics #10593

Conversation

dmitryax
Copy link
Member

@dmitryax dmitryax commented Jul 11, 2024

Add data_type attribute to the internal otelcol_exporter_queue_size metric to report the type of data being processed.

All other metrics have the data type reported as part of their names. We could've done the same for queue metrics, but that would introduce a significant breaking change. We want to avoid that until we have all the metrics standardized with OpenTelemetry semantic conventions.

Fixes #9943

@dmitryax dmitryax requested review from a team and songy23 July 11, 2024 00:54
@dmitryax dmitryax marked this pull request as draft July 11, 2024 00:54
dmitryax added a commit that referenced this pull request Jul 16, 2024
…or (#10608)

Attribute sets for async instruments now can be set as options to
callback setters and async instruments initializers. This allows each
async instrument to have its own attribute set.

Unblocks
#10593
@dmitryax dmitryax force-pushed the exporterhelper-report-datatype-in-queue=metrics branch 2 times, most recently from 74aea3e to dc8e02d Compare July 22, 2024 16:56
@dmitryax dmitryax marked this pull request as ready for review July 22, 2024 16:56
@dmitryax dmitryax force-pushed the exporterhelper-report-datatype-in-queue=metrics branch 3 times, most recently from c240cb9 to 6e55752 Compare July 22, 2024 17:00
Copy link

codecov bot commented Jul 22, 2024

Codecov Report

Attention: Patch coverage is 68.42105% with 6 lines in your changes missing coverage. Please review.

Project coverage is 92.38%. Comparing base (21c3f36) to head (b4b1968).

Files Patch % Lines
component/componenttest/obsreporttest.go 0.00% 4 Missing ⚠️
component/componenttest/otelprometheuschecker.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10593      +/-   ##
==========================================
- Coverage   92.39%   92.38%   -0.01%     
==========================================
  Files         403      403              
  Lines       18739    18741       +2     
==========================================
+ Hits        17313    17314       +1     
- Misses       1066     1067       +1     
  Partials      360      360              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dmitryax dmitryax force-pushed the exporterhelper-report-datatype-in-queue=metrics branch 2 times, most recently from 90567ba to e642443 Compare July 22, 2024 19:16
Add data_type attribute to the internal otelcol_exporter_queue_size metric to report the type of data being processed.

All other metrics have the data type reported as part of their names. We could've done the same for queue metrics, but that would introduce a significant breaking change. We want to avoid that until we have all the metrics standardized with OpenTelemetry semantic conventions.
@dmitryax dmitryax force-pushed the exporterhelper-report-datatype-in-queue=metrics branch from e642443 to b4b1968 Compare July 23, 2024 17:00
@@ -7,6 +7,9 @@ const (
// ExporterKey used to identify exporters in metrics and traces.
ExporterKey = "exporter"

// DataTypeKey used to identify the data type in the queue size metric.
DataTypeKey = "data_type"
Copy link
Contributor

Choose a reason for hiding this comment

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

should this be what the otep recommends otel.signal?

Copy link
Member Author

@dmitryax dmitryax Jul 23, 2024

Choose a reason for hiding this comment

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

I'm not sure about it. We use data_type as a field for logging. Once the OTEP is ready and we adopt it, the metric is going to change anyway. Keeping an attribute name doesn't seem to help with the migration. Also, otel.signal could still potentially change before the OTEP is merged.

Copy link
Member Author

Choose a reason for hiding this comment

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

@codeboten I'm open to any attribute name. Let me know what do you think considering my previous comment.

Copy link
Contributor

Choose a reason for hiding this comment

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

@dmitryax probably ok to go with an attribute consistent w/ logging for now.

Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

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

I searched through semantic conventions and couldn't find guidance for attributes that specify signal types. Should an issue be opened there?

@dmitryax
Copy link
Member Author

dmitryax commented Jul 23, 2024

I searched through semantic conventions and couldn't find guidance for attributes that specify signal types. Should an issue be opened there?

Yeah, that's something that can be done before the OTEP. I'll create one

@dmitryax dmitryax merged commit c239e73 into open-telemetry:main Jul 23, 2024
49 of 50 checks passed
@github-actions github-actions bot added this to the next release milestone Jul 23, 2024
@dmitryax dmitryax deleted the exporterhelper-report-datatype-in-queue=metrics branch July 23, 2024 21:30
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.

[exporter/exporterhelper] queue_size and queue_capacity internal metrics are missing the data type attribute
4 participants