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

Ability to set a maximum attribute length #3297

Closed
ejsmith opened this issue May 23, 2022 · 6 comments · Fixed by #3376
Closed

Ability to set a maximum attribute length #3297

ejsmith opened this issue May 23, 2022 · 6 comments · Fixed by #3376
Assignees
Labels
enhancement New feature or request

Comments

@ejsmith
Copy link
Contributor

ejsmith commented May 23, 2022

Feature Request

NewRelic limits their attribute length to 4096 characters and if an attribute is larger than that, it will drop the data. It would be nice to have an option in the client that truncates any attribute values that are longer than a given size.

@ejsmith ejsmith added the enhancement New feature or request label May 23, 2022
@alanwest
Copy link
Member

@ejsmith I'll be working on a solution to this soon.

I started some work in #3231 experimenting with doing truncation in the shim API. I also proposed it in the .NET activity API (dotnet/runtime#68528), but at this time there's a desire to solve this in the SDK. Specifically in exporters per this comment #3231 (comment).

I've been wrapping up some work to handle attributes uniformly across all exporters and intend to circle back and address these length limits.

@AlexandruRus23
Copy link

@alanwest

Sorry to highjack this. I would need this functionality, but I'm still targeting .net 6 and it seems like this is only included in 1.4.1-beta that ultimately references system.diagnostics 7.0 preview. Is there any chance this will get included in a stable package of the exporter, like 1.3.2 or similar?

Thanks!

@alanwest
Copy link
Member

@AlexandruRus23 This functionality will be released with 1.4.0 and can be used now by .NET 6 applications using the beta release.

System.Diagnostics.DiagnosticSource version 7 supports .NET 6. See: https://www.nuget.org/packages/System.Diagnostics.DiagnosticSource/7.0.0-rc.2.22472.3

@pellared
Copy link
Member

pellared commented Nov 25, 2022

@alanwest Am I correct that it is working only for OTLP exporter and it is not documented?

@pellared
Copy link
Member

I created #3949

@alanwest
Copy link
Member

alanwest commented Nov 28, 2022

Am I correct that it is working only for OTLP exporter and it is not documented?

@pellared The attribute limit configuration is supported by all the exporters provided by this repo: OTLP (traces and logs), Jaeger, and Zipkin. Metric and resource attributes are not subject to the limits per the spec.

edit:

The attribute limit configuration is supported by all the exporters provided by this repo: OTLP (traces and logs), Jaeger, and Zipkin.

Lies... you're correct, only the OTLP exporter is supported currently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants