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

OpenTelemetry Metrics Support For Live Metrics #43564

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

Conversation

benke520
Copy link
Member

Summary: This PR enables Open Telemetry metrics to be streamed and seen on the Live Metrics UX. Includes functionality to collect, store, and send requested open telemetry metrics.

QuickPulseConfiguration:

  • Contains logic for extracting and holding the eTag and requested metrics from PING/POST requests when a user makes a request for certain Open Telemetry metrics on the Live Metrics UX.
  • Updated invariant version to 6. 6 represents that Java SDK supports Open Telemetry metrics but not live filtering, 7 represents that Java SDK supports both.
  • Keeps track of eTag and concurrent HashMap of requested Open Tel metrics, with getter and setter methods for both.
  • The parseMetrics( ) method parses the user requested metrics in the response of the PING or POST requests into OpenTelMetricInfo objects before storing them.
  • All methods in QuickPulseConfiguration have been synchronized for multi-threading.

QuickPulseCollector:

  • Added OpenTelMetricsStorage to handle logic of storing and retrieving Open Tel metrics.
  • Limited number of Open Tel metrics that can be stored at any given time to 50, and the amount of time to wait before declaring a metric inactive to 5 minutes. These will be reviewed based on customer needs.
  • Whenever a post request is being made, the processMetrics() method is called. Metrics that have surpassed the buffer time are declared inactive and deleted, metrics that have been requested by the user are sent to processMetric( ) to be aggregated and formatted accordingly. All data points for each metric are cleared as well.
  • OpenTelDataPoint and OpenTelMetric are the data models used to store metrics inside of OpenTelMetricsStorage.

QuickPulseDataFetcher:

  • Modified to append user-requested Open Tel metrics to the list of standard metrics when addMetricsToQuickPulseEnvelope() is called.

QuickPulseDataSender:

  • Modified to also update QuickPulseConfiguration with etag and requested metrics from response of POST if new eTag has been detected.

QuickPulsePingSender:

  • Modified to update QuickPulseConfiguration with etag and requested metrics when PING response contains a "x-ms-qps-subscribed: true" header.

QuickPulseMetricReader.

  • Contains logic for retrieving raw metrics Open Telemetry has collected via collectAllMetrics().

QuickPulseMetricReceiver.

  • Runs on separate thread. Calls the collectAllMetrics() in QuickPulseMetricReader every 1 second and sends collected metrics to QuickPulseDataCollector if QuickPulse is active.

t-nsukumar and others added 30 commits July 3, 2024 10:55
@benke520
Copy link
Member Author

This PR was based on this previously closed one: #41220

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OpenTelemetry OpenTelemetry instrumentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants