-
Notifications
You must be signed in to change notification settings - Fork 986
how to map declarative config properties #14144
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
base: main
Are you sure you want to change the base?
Changes from all commits
1d5eba4
ee5659d
bc30ab5
d337cf7
c1cfd8b
17d9656
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
# This file serves as a specification how to map properties from the existing config properties | ||
# to the declarative configuration format. | ||
# This list does not contain all properties, but those that | ||
# are different from what the config bridge already does. | ||
|
||
# Also see | ||
# - https://github.com/open-telemetry/opentelemetry-configuration/blob/main/examples/sdk-migration-config.yaml | ||
# - https://github.com/open-telemetry/opentelemetry-configuration/blob/main/examples/sdk-config.yaml | ||
|
||
instrumentation/development: | ||
# nothing changes here - just for reference | ||
general: | ||
peer: | ||
service_mapping: # was "otel.instrumentation.common.peer-service-mapping" | ||
- peer: 1.2.3.4 | ||
service: FooService | ||
- peer: 2.3.4.5 | ||
service: BarService | ||
http: | ||
# should be added to https://github.com/open-telemetry/opentelemetry-configuration/blob/c205770a956713e512eddb056570a99737e3383a/examples/kitchen-sink.yaml#L872 | ||
known_methods: # was "otel.instrumentation.http.known-methods" | ||
- GET | ||
- POST | ||
- PUT | ||
- DELETE | ||
- PATCH | ||
- HEAD | ||
- OPTIONS | ||
client: | ||
request_captured_headers: # was otel.instrumentation.http.client.capture-request-headers | ||
- Content-Type | ||
- Accept | ||
response_captured_headers: # was otel.instrumentation.http.client.capture-response-headers | ||
- Content-Type | ||
- Content-Encoding | ||
server: | ||
request_captured_headers: # was otel.instrumentation.http.server.capture-request-headers | ||
- Content-Type | ||
- Accept | ||
response_captured_headers: # was otel.instrumentation.http.server.capture-response-headers | ||
- Content-Type | ||
- Content-Encoding | ||
java: | ||
agent: | ||
zeitlinger marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# Also map all other properties with the "otel.javaagent." prefix the same way, | ||
# unless specified otherwise. | ||
# See https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/14132 | ||
exclude_class_loaders: # was "otel.javaagent.exclude-class-loaders" | ||
- a | ||
- b | ||
common: | ||
default: | ||
enabled: true # was "otel.instrumentation.common.default-enabled" | ||
db_statement_sanitizer: | ||
enabled: true # already exists - just for reference | ||
thread_details: | ||
# disabled by default | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. currently it is enabled by default, it is disabled when running tests There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @trask suggested that is should be off by default: #14144 (comment) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought that this is supposed to represent what the agent currently does, feel free to ignore if it has a different purpose. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's supposed to be the spec for declarative configuration. |
||
# enabled applies to both spans and logs (but not metrics due to high cardinality) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this setting does not apply to logs, they use a different flag for the thread attributes There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. then we should probably add this here as thread_details/logging/enabled There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the current attributes to add thread details to logs are
I similar argument could be made where we have different settings for adding baggage to log context:
|
||
enabled: true # was "otel.javaagent.add-thread-details" = "true" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. alternatively: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's a good question honestly I wonder how useful this instrumentation is, and whether we should disable it by default in 3.0 @laurit? I guess my preference would be
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess we could apply this new semantic also to the spring starter where this feature is added without declarative config in #14117 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The semantic conventions recommend setting these attributes. Comments in open-telemetry/opentelemetry-specification#788 list some potential usages. It is difficult to predict when which attributes could be valuable. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @trask agreed to check with sem conv |
||
|
||
# These cannot be used in the Java Agent, because they are read in early stages, | ||
# but the Spring starter may use them (need to be discussed). | ||
disabled: false # was: "otel.sdk.enabled" | ||
log_level: info # is not used is Spring starter yet | ||
|
||
# Note: The following properties still have to be specified with system properties or | ||
# environment variables, because they are read in early stages of the application startup: | ||
# User facing: | ||
# - otel.javaagent.enabled | ||
# - otel.javaagent.debug | ||
# - otel.javaagent.extensions | ||
# - otel.javaagent.logging | ||
# - otel.javaagent.logging.application.logs-buffer-max-records | ||
# - otel.javaagent.configuration-file (although you shouldn't need this with declarative configuration) | ||
# - otel.javaagent.experimental.field-injection.enabled | ||
# - otel.javaagent.experimental.security-manager-support.enabled | ||
# Internal: | ||
# - otel.javaagent.experimental.thread-propagation-debugger.enabled | ||
# - otel.javaagent.testing.fail-on-context-leak | ||
|
||
# These properties could be read from declarative configuration in the future, but are not yet. | ||
# Issue: https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/14192 | ||
# - otel.experimental.javascript-snippet | ||
# - otel.instrumentation.aws-sdk.experimental-record-individual-http-error | ||
# - otel.instrumentation.aws-sdk.experimental-span-attributes | ||
# - otel.instrumentation.aws-sdk.experimental-use-propagator-for-messaging | ||
# - otel.instrumentation.common.db-statement-sanitizer.enabled | ||
# - otel.instrumentation.common.logging.span-id | ||
# - otel.instrumentation.common.logging.trace-flags | ||
# - otel.instrumentation.common.logging.trace-id | ||
# - otel.instrumentation.experimental.span-suppression-strategy | ||
# - otel.instrumentation.genai.capture-message-content | ||
# - otel.instrumentation.jdbc.experimental.capture-query-parameters | ||
# - otel.instrumentation.jdbc.experimental.transaction.enabled | ||
# - otel.instrumentation.log4j-context-data.add-baggage | ||
# - otel.instrumentation.messaging.experimental.capture-headers | ||
# - otel.instrumentation.messaging.experimental.receive-telemetry.enabled | ||
# - otel.semconv-stability.opt-in |
Uh oh!
There was an error while loading. Please reload this page.