What are you trying to achieve?
I want to have a way in which I create the resource based on config. Within declarative config we can define:
- attributes to be included/excluded
- config options for the detector
However when I look at otel specs the usage of this is not defined https://opentelemetry.io/docs/specs/otel/resource/sdk/
This has come about as I was looking to understand how resource detectors can be enabled/disabled in zero-code scenarios.
What would help is if we had an api doc which defines the methods the sdk is to implement just like other domains
My thoughts would be:
- introduce a create method on ResourceDetector with parameters (all optional):
- options
- attributes to be included/excluded
- schemaRegistry (schema Url without version)
- define a detect method on ResourceDetector which returns a resource
- introduce a detect method on ResourceDetector which takes parameters (all optional):
- introduce an enabled method on ResourceDetector so sdk can know if it is enabled
- introduce a schemaRange property (min & Max) on ResourceDetector to return what is supported on enabled detectors so that the sdk can determine what min schema version is to be used in detect
- define the create method for a resource
- define the merge method for a resource
Why this is important is currently if a language follows the specs, they would not be implementing resources as part of the api library but just the sdk. The impact of this is all resource detectors would be dependent on the sdk rather than api which we don't want.
I know there is multiple things and would suggest first tackling the define items as these are already in the sdk and then tackling seperately the introduction.
Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.
What are you trying to achieve?
I want to have a way in which I create the resource based on config. Within declarative config we can define:
However when I look at otel specs the usage of this is not defined https://opentelemetry.io/docs/specs/otel/resource/sdk/
This has come about as I was looking to understand how resource detectors can be enabled/disabled in zero-code scenarios.
What would help is if we had an api doc which defines the methods the sdk is to implement just like other domains
My thoughts would be:
Why this is important is currently if a language follows the specs, they would not be implementing resources as part of the api library but just the sdk. The impact of this is all resource detectors would be dependent on the sdk rather than api which we don't want.
I know there is multiple things and would suggest first tackling the define items as these are already in the sdk and then tackling seperately the introduction.
Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding
+1orme too, to help us triage it. Learn more here.