Repository navigation
Replace the string-tagged metric functions with handles - #407
Draft
cataphract wants to merge 1 commit into
Draft
cataphract wants to merge 1 commit into
cataphract wants to merge 1 commit into
Conversation
The tracer and telemetry record their metrics through handles, so the old API, which copied and hashed tag strings on every call, is removed.
3 tasks
This branch has not been deployed
This file contains hidden or 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
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.
Overview
Removes the string-tagged metric functions (
counter::increment,decrementandset,rate::set,distribution::add) and moves their callers to the metric handles of #404. Thedistributionspayload goes away: all distributions are now sent assketches.Stacked on #406.
Motivation
With handles in place, keeping the old functions would mean two metric APIs, two storage paths in
Telemetry, and two distribution payloads. The old path is also the slow one: #404 explains what it costs on every point.Additional Notes
TracerMetricsstruct of handles, created on first use. Every tracer of a process shares them, as it shared the old global metrics. It is never destroyed, so its handles still exist whenTelemetrysendsapp-closing.Telemetry's own metrics (logs_createdand thetelemetry_api.*metrics) are handles thatTelemetrycreates, withendpoint:agentas a fixed tag.status_code(1xx to 5xx, viaStatusTags::from_http_status),level,new_continued,header_styleandtruncation_reason.trace_chunks_enqueued_for_serialization,context_header_truncated,trace_api.msandtelemetry_api.ms.References
Jira ticket: APPSEC-70954
Contributor Checklist