But looking at the generated struct, there's no way for me to get additional properties:
type Attributes struct {
// ServiceName corresponds to the JSON schema field "service.name".
ServiceName *string `mapstructure:"service.name,omitempty"`
}
I'd like to propose an additional field is added to the generated struct to look something like this:
type Attributes struct {
// ServiceName corresponds to the JSON schema field "service.name".
ServiceName *string `mapstructure:"service.name,omitempty"`
AdditionalProperties map[string]interface{} // <--- the type here could depend on the "type" field if one is set
}
With the following schema, I would expect to be able to access additional properties on the generated struct:
But looking at the generated struct, there's no way for me to get additional properties:
I'd like to propose an additional field is added to the generated struct to look something like this:
Reference
Full schema: https://github.com/open-telemetry/opentelemetry-configuration/blob/c5128cc4bb08514431e2c7b0573e0503e23df522/schema/resource.json#L15
Generated code: https://github.com/open-telemetry/opentelemetry-go-contrib/blob/044e09ac8bfe0d5a60510778017bec57413243d9/config/generated_config.go#L19-L22