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

AnyValue diverging from spec on website #501

Closed
bripkens opened this issue Jul 20, 2023 · 2 comments
Closed

AnyValue diverging from spec on website #501

bripkens opened this issue Jul 20, 2023 · 2 comments

Comments

@bripkens
Copy link
Contributor

bripkens commented Jul 20, 2023

Hey folks,

we noticed that the documentation on the OTel website for attributes and the OTLP definition for AnyValue are slightly different. More specifically, OTLP accepts a wider range of values – specifically bytes and KeyValueList. Consequently, some questions came up:

  • In what situation would one see a bytes or KeyValueList?
  • Should this be corrected on the website? Or maybe explained via a code comment in OTLP?

OTLP

message AnyValue {
// The value is one of the listed fields. It is valid for all values to be unspecified
// in which case this AnyValue is considered to be "empty".
oneof value {
string string_value = 1;
bool bool_value = 2;
int64 int_value = 3;
double double_value = 4;
ArrayValue array_value = 5;
KeyValueList kvlist_value = 6;
bytes bytes_value = 7;
}
}

Website (source)

image
@tigrannajaryan
Copy link
Member

Logs require it: https://opentelemetry.io/docs/specs/otel/logs/data-model/#type-any

There is an open spec issue to allow traces and metrics to also use KeyValueList: open-telemetry/opentelemetry-specification#376

@bripkens
Copy link
Contributor Author

Awesome, thank you for the clarification @tigrannajaryan!

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

No branches or pull requests

2 participants