-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
OTEL plugin: No way to set variable values to resource attributes #12538
Comments
@samugi Are you maybe available to look into this? TIA |
@sriemer thank you for opening this issue. The behavior you describe is expected: there is currently no support for parsing OpenTelemetry's Regarding your additional comments in the "Anything else?" section, the tracing PDK currently only allows setting span attributes, |
Thanks for your reply and your offer. I might come back to it. But for now I have issues to get the container ID due to sandboxing. So I'm looking for solutions in Instana agent code right now. |
@sriemer, do you think that this issue is solved? Could you close it? |
This is a common issue. I need support modifying OpenTelemetry's resource attributes too. For example, the New Relic OTEL agent asks for more information to be added on OpenTelemetry spans (https://docs.newrelic.com/docs/more-integrations/open-source-telemetry-integrations/opentelemetry/view-your-data/opentelemetry-transactions-page/) |
@Water-Melon I remember that you've proposed a feature of variables in configuration. Do you have any idea? |
What I did on our end is to go for the |
Is this feature request still on going? Any plan to support it in the near future? @samugi @Water-Melon |
I think there are 2 features requested in this ticket: 1 for nested attributes and 1 for dynamic sources of custom attributes. |
@StarlightIbuki it would require supporting templates in order to render the resource attribute values as lua code, which is something we support in other plugins' fields, but is slightly more complex than just making the field "referenceable". |
Is there an existing issue for this?
Kong version (
$ kong version
)Kong 3.5.0
Current Behavior
All configured OTel resource attributes are taken from config as plain strings.
I do not see any possibility to set a variable value such as the current host name for example as resource attributes.
For span to OTel infrastructure linking on the Instana UI I need special OTel resource attributes such as
host.name
,process.pid
, andcontainer.id
.But no type of variable is resolved.
Expected Behavior
If I put
into the OTel plugin config, then I would expect this to be resolved as the same value as from span attribute
http.host
. But it sends out "$host" instead. In my demo repo, the hostname of my Kong container would be "kong-gateway".Steps To Reproduce
Anything else?
Replacing the value of resource attributes with custom LUA code would be nice as well. I imagine something like:
But I get an error "attempt to call method 'set_resource_attribute' (a nil value)".
Or just putting attributes where they belong to would be nice as well:
Right now this adds a span attribute "resouce.host.name" instead of resolving this to a resource attribute
"tags":{"http.host":"kong-gateway" ... ,"resource":{"host.name":"kong-gateway",...}
The text was updated successfully, but these errors were encountered: