opentelemetry-rust icon indicating copy to clipboard operation
opentelemetry-rust copied to clipboard

Otel API should not enforce attribute or event limits

Open cijothomas opened this issue 9 months ago • 7 comments

Looks like API for Events and Links has dropped_attribute_counts? https://github.com/open-telemetry/opentelemetry-rust/blob/main/opentelemetry/src/trace/mod.rs#L206

Given the API is not expected to enforce any limits by its own and delegates to the SDK, this should be removed from public API of opentelemetry crate.

cijothomas avatar Mar 04 '25 14:03 cijothomas

I would be happy to work on this. Please assign it to me

mohammadVatandoost avatar May 18 '25 18:05 mohammadVatandoost

@cijothomas Do we need to remove dropped_attribute_counts from proto file too, right?

mohammadVatandoost avatar May 20 '25 18:05 mohammadVatandoost

@cijothomas Do we need to remove dropped_attribute_counts from proto file too, right?

No. dropped_counts can remain everywhere, except in the opentelemetry crate.

cijothomas avatar May 20 '25 18:05 cijothomas

@cijothomas Do we need to remove dropped_attribute_counts from proto file too, right?

No. dropped_counts can remain everywhere, except in the opentelemetry crate.

Ok, if we want to remove dropped_counts from these structs: Event and Link , then how should we set values for functions that for example use dropped_counts to build new proto struct? like Should we use const value or reading the value from env?

mohammadVatandoost avatar May 21 '25 21:05 mohammadVatandoost

I think there is a confusion about this item, let me clarify: Dropped counts is a valid thing - it should be enforced, and should be exported in the otlp proto too. but this is a functionality to be done by the opentelemetry_sdk crate. But currently opentelemetry crate is exposing these fields. This issue is about how to remove this from just opentelemetry, and expose it only in opentelemetry_sdk.

let me know if this is clear.. Note: I think this is very closely related to https://github.com/open-telemetry/opentelemetry-rust/issues/2886 as well, but could be tackled independently.

cijothomas avatar May 22 '25 01:05 cijothomas

thank you, Now it is more clear

mohammadVatandoost avatar May 22 '25 20:05 mohammadVatandoost

I think there is a confusion about this item, let me clarify: Dropped counts is a valid thing - it should be enforced, and should be exported in the otlp proto too. but this is a functionality to be done by the opentelemetry_sdk crate. But currently opentelemetry crate is exposing these fields. This issue is about how to remove this from just opentelemetry, and expose it only in opentelemetry_sdk.

let me know if this is clear.. Note: I think this is very closely related to #2886 as well, but could be tackled independently.

FWIW for #2886 - all of these APIs are no longer in use in the Big otel-tracing Refactor Branch, and removing their use is effectively blocked by them. So I don't think anyone should try work on that ticket until we've got closure there.

scottgerring avatar May 27 '25 06:05 scottgerring