[feat][misc] PIP-320: Add OpenTelemetry scaffolding#22010
Merged
merlimat merged 139 commits intoapache:masterfrom Feb 9, 2024
Merged
[feat][misc] PIP-320: Add OpenTelemetry scaffolding#22010merlimat merged 139 commits intoapache:masterfrom
merlimat merged 139 commits intoapache:masterfrom
Conversation
asafm
approved these changes
Feb 8, 2024
Contributor
asafm
left a comment
There was a problem hiding this comment.
Looks brilliant now, thanks for fixing all the comments!
lhotari
reviewed
Feb 8, 2024
lhotari
requested changes
Feb 8, 2024
...r-otel-integration/src/main/java/org/apache/pulsar/common/stats/OpenTelemetryAttributes.java
Outdated
Show resolved
Hide resolved
pulsar-otel-integration/src/main/java/org/apache/pulsar/common/stats/package-info.java
Outdated
Show resolved
Hide resolved
...r-functions/worker/src/main/java/org/apache/pulsar/functions/worker/PulsarWorkerService.java
Show resolved
Hide resolved
...ar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/stats/package-info.java
Outdated
Show resolved
Hide resolved
lhotari
approved these changes
Feb 9, 2024
Member
lhotari
left a comment
There was a problem hiding this comment.
LGTM. Good work @dragosvictor
lhotari
reviewed
Feb 9, 2024
...ar-opentelemetry/src/test/java/org/apache/pulsar/opentelemetry/OpenTelemetryServiceTest.java
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #22010 +/- ##
=============================================
+ Coverage 36.56% 73.64% +37.07%
- Complexity 12418 32043 +19625
=============================================
Files 1729 1870 +141
Lines 132076 139039 +6963
Branches 14452 15245 +793
=============================================
+ Hits 48295 102394 +54099
+ Misses 77387 28712 -48675
- Partials 6394 7933 +1539
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
2 tasks
15 tasks
hanmz
pushed a commit
to hanmz/pulsar
that referenced
this pull request
Feb 12, 2025
Co-authored-by: Matteo Merli <mmerli@apache.org>
sandeep-ctds
pushed a commit
to datastax/starlight-for-kafka
that referenced
this pull request
Apr 30, 2025
rithick-ctds
pushed a commit
to datastax/starlight-for-kafka
that referenced
this pull request
May 2, 2025
* Updated confluent/kafka image version to use 7.8.2 as the latest(7.9.0) is not supported yet. * Added clusterName to proxyConf as OpenTelemetry expects it since apache/pulsar#22010 * Added missing tlsProvider Config parameter to 4.0_ds --------- Co-authored-by: mallasandeep <sandeep.malla78@gmail.com>
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.
PIP-320
Motivation
PIP-264 laid out the foundation for switching our entire metrics pipeline to OpenTelemetry. PIP-320 describes the first step in this process, adding an SDK wrapper to instantiate an OpenTelemetry client with a couple of sane defaults for Pulsar brokers, proxies and function workers. This PR provides the implementation for the new wrapper.
Modifications
pulsar-otel-metrics-providerto encapsulate the newOpenTelemetryService. Our immediate goal is to make the service available to the broker, proxy, and function worker. Putting this in a new artifact allows us to cherry-pick this dependency as needed. Alternatively, this could be moved topulsar-common, but it would then leak into the clients as well, which are out of scope for now. For the desired out-of-the-box experience, this artifact additionally pulls in the OTLP and Prometheus exporter dependencies.OpenTelemetryServiceclass as a wrapper for the safe instantiation of the OpenTelemetry SDK. It serves the following purposes:Meter(called the cardinality limit) from 2000 to 10000.pulsar.clusteras a resource attribute (aka label) to all metrics emitted by this SDK instance. Note that this parameter cannot be null or empty. Many of the existing Proxy tests were not setting this value in their configuration and had to be adapted. This value can also be overridden by environment variables or system properties.Meterobjects. These are used to emit the actual metrics.Verifying this change
This change added tests and can be verified as follows:
OpenTelemetryService, including:testClusterNameCannotBeEmptytestClusterNameCannotBeNulltestResourceAttributesAreSettestIsInstrumentationNameSetOnMetertestMetricCardinalitytestLongCounter: verifies basic integer counter metrics can be emittedtestServiceIsDisabledByDefaultMetricsTest, validating the entire end-to-end metrics pipeline for brokers, proxies, and function-workers, using both the in-process Prometheus exporter and remote OTLP collector. Separated to run in its own CI integration test target, as it did not naturally fit anywhere else.Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: dragosvictor#6