Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cel-sampler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The `CelBasedSampler` supports [declarative configuration](https://opentelemetry
To use:

* Add a dependency on `io.opentelemetry.contrib:opentelemetry-cel-sampler:<version>`
* See the [extension documentation](https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/examples/extension/README.md#build-and-add-extensions) for how to add extensions when using the java agent.
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this module has an external dependency it can't just be added as an extension. User would first need to merge everything into single jar or also pass the cel jar as an extension (haven't tried that but since all the extensions are in the same class loader passing the dependencies as extensions should work). We could make this simpler by publishing shaded jars like in

See also https://github.com/open-telemetry/opentelemetry-java-contrib/blob/5809da024bf450aa388d37a7ca2c398c2ca2cac0/gcp-auth-extension/README.md#with-opentelemetry-java-agent

Copy link
Contributor

Choose a reason for hiding this comment

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

@laurit Good point. I will have a look into this. Definitly an improvement.

* Follow the [instructions](https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/incubator/README.md#declarative-configuration) to configure OpenTelemetry with declarative configuration.
* Configure the `.tracer_provider.sampler` to include the `cel_based` sampler.

Expand Down
1 change: 1 addition & 0 deletions samplers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ The following samplers support [declarative configuration](https://opentelemetry
To use:

* Add a dependency on `io.opentelemetry.contrib:opentelemetry-samplers:<version>`
* NOTE: if using the java agent, this sampler is already included in versions 2.21+ and no additional dependency is required.
* Follow the [instructions](https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/incubator/README.md#declarative-configuration) to configure OpenTelemetry with declarative configuration.
* Configure the `.tracer_provider.sampler` to include the `rule_based_routing` sampler.

Expand Down