You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When adding Attributes to ResourceBuilder, AddAttributes accepts IEnumerable<KeyValuePair<string, object>>. However, when adding a tag with value as int, the value is discarded / null in jaeger.
When using a string or calling ToString() the value is used.
What is the expected behavior?
Since the parameter is of type object the int value should work.
What is the actual behavior?
The integer value is lost.
Reproduce
BackendServiceResource=ResourceBuilder.CreateDefault().AddService(serviceName:ServiceName,serviceInstanceId:ServiceInstanceId,serviceNamespace:ServiceNamespace,serviceVersion:ServiceVersion).AddAttributes(new[]{newKeyValuePair<string,object>("my.foobar1",1),// will get lostnewKeyValuePair<string,object>("my.foobar2","2"),newKeyValuePair<string,object>("my.foobar3",3.ToString()),});// ...builder.SetResourceBuilder(BackendServiceResource)//...
Result in jaeger 1.21.0:
The text was updated successfully, but these errors were encountered:
Thanks @Mario-Hofstaetter for reporting.
The attributes are currently only supporting bool, long, double, string. We need to make it same as the Tags in activity. I'll make a bug fix.
Bug Report
netcoreapp3.1
Symptom
When adding Attributes to
ResourceBuilder
,AddAttributes
acceptsIEnumerable<KeyValuePair<string, object>>
.However, when adding a tag with value as
int
, the value is discarded /null
in jaeger.When using a
string
or callingToString()
the value is used.What is the expected behavior?
Since the parameter is of type
object
the int value should work.What is the actual behavior?
The integer value is lost.
Reproduce
Result in jaeger
1.21.0
:The text was updated successfully, but these errors were encountered: