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

add support for instrumentation configuration? #87

Closed
brettmc opened this issue May 9, 2024 · 5 comments · Fixed by #91
Closed

add support for instrumentation configuration? #87

brettmc opened this issue May 9, 2024 · 5 comments · Fixed by #91

Comments

@brettmc
Copy link
Contributor

brettmc commented May 9, 2024

Over in PHP SIG, we've started to implement file-based configuration, and it's going well.
We also have a requirement where some of our automatic instrumentation modules require configuration. So, following the file-configuration way of thinking, we're enabling this through a secondary .yaml file, along with another env var to point to the file. For example, OTEL_PHP_INSTRUMENTATION_CONFIG_FILE=otel-instrumentation.yaml:

config:
  - example_instrumentation:
      span_name: ${EXAMPLE_INSTRUMENTATION_SPAN_NAME:-example span}
  - another_instrumentation:
      enabled: false
      foo_param: "some.value"

Could something like this be incorporated into the SDK configuration schema, for example under an instrumentation key?

@jack-berg
Copy link
Member

Could something like this be incorporated into the SDK configuration schema, for example under an instrumentation key?

Yes I think so. There are a couple of things to think through:

  • What configuration is language / framework agnostic enough to warrant inclusion in the schema?
  • How should we accommodate language / framework specific configuration?
  • How does instrumentation access the configuration? We talked about this in the 5/13/24 config working group and one idea was to add API surface area for configuration, such that instrumentation could access configuration from a global. We could expose something like the component provider properties type, and potentially some helper methods for instrumentation to resolve certain common configuration given a generic configuration type.

I think a good starting point is to include a handful of obvious generic instrumentation configuration properties in the schema, and work through some of these questions during that PR and in followups. One that @trask brought up was which headers should be captured for http semantic conventions. There are probably others.

Would you be willing to open a PR?

@jack-berg
Copy link
Member

jack-berg commented May 16, 2024

open-telemetry/opentelemetry-specification#3560 is another example of instrumentation config.

@jack-berg
Copy link
Member

@jack-berg
Copy link
Member

An old related issue where we tried to compile examples of instrumentation configuration: MrAlias/otel-schema#8

@brettmc
Copy link
Contributor Author

brettmc commented May 19, 2024

Would you be willing to open a PR?

Yes. I'll start to play around with it to see how I can achieve something basic first. I like the idea of having some generic/common properties - headers to capture is one that PHP also requires across a couple of different instrumentation packages.

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

Successfully merging a pull request may close this issue.

2 participants