-
Notifications
You must be signed in to change notification settings - Fork 772
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
process.command_args
serializes as System.String[]
#3229
Comments
Digging up an old, but I think related to this #1973 |
Based on some discussion in #3238 it seems like there is some work in #2010 that is going on that will affect this. Since I'm not on the inside track with what's going on there, I don't know that I'll personally be able to do a PR to fix this issue. However, if someone can give me some tips/guidance on what to do (or what I should be waiting for), I'd be happy to chip in. |
Hmm, this is probably not completely resolved yet, so reopening... I think the Console exporter requires a little work - should be easy, I'll take a look. Will look at Prometheus too. |
This issue was marked stale due to lack of activity and will be closed in 7 days. Commenting will instruct the bot to automatically remove the label. This bot runs once per day. |
Closed as inactive. Feel free to reopen if this issue is still a concern. |
Bug Report
List of all OpenTelemetry NuGet
packages and version that you are
using (e.g.
OpenTelemetry 1.0.2
):Runtime version (e.g.
net462
,net48
,netcoreapp3.1
,net6.0
etc. You canfind this information from the
*.csproj
file):Symptom
I'm adding the
process.command_args
metadata to a trace resource and when it is serialized to a trace span it appears asSystem.String[]
instead of the actual array of values. I see this in both the Console exporter as well as using OpenTelemetry Collector.What is the expected behavior?
I expect the array of arguments to be kept as an array of strings as defined in the spec.
What is the actual behavior?
The value is rendered like
.ToString()
was called on the array, so it'sSystem.String[]
instead of the values.Reproduce
Create a resource detector like this:
Add that to your resource when you wire up trace.
Detection runs totally fine, and if you debug it, you can see that the proper array of arguments is getting added to the resource. However, when it serializes, you'll see...
Additional Context
I noticed a similar issue about array serialization but it was for span attributes, not resource attributes. I think this is happening in this
ToOtlpAttribute()
method, at least for the OpenTelemetry exporter, but I haven't really figured out how it's happening for the console exporter yet. Admittedly I haven't super dug in; I just noticed it and was puzzled.The text was updated successfully, but these errors were encountered: