-
Notifications
You must be signed in to change notification settings - Fork 205
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
Add inherited attributes preview #1854
Conversation
"preview": { | ||
"inheritedAttributes": [ | ||
{ | ||
"key": "tenant", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add tests for other data type supported? i am interested in seeing the structure of Array type, those a bit complicated ones.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think non-string attributes will be pretty rare for this feature
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we expect string all the time, can you refactor SpanAttributeType and InheritedAttribute to support string only?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to leave open the possibility for others
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
at least remove the array types because Breeze won't accept array? we can add it back when it's supported? i just feel that this might never get used and become confusing later...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
arrays are converted to strings, see Exporter.getStringValue()
for (AttributeKey<?> inheritAttributeKey : inheritAttributeKeys) { | ||
Object value = TempGetAttribute.getAttribute(parentReadableSpan, inheritAttributeKey); | ||
if (value != null) { | ||
span.setAttribute((AttributeKey<Object>) inheritAttributeKey, value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are inheritAttributes part of the customDimensions in the payload?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
case STRING: | ||
return AttributeKey.stringKey(key); | ||
case BOOLEAN: | ||
return AttributeKey.booleanKey(key); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i checked out #1743, the way they send extra attributes are through part C. Breeze accepts key/value pair string only. how other datatypes here will get used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they are all converted to strings, see Exporter.getStringValue()
Resolves #1743