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
I am developing a sampler to drop some traces that I don't need, e.g: redis ping/pong heartbeat connection.
But I found I can't get the attribute I need in Sampler.shouldSample method: public class XxxSampler implements Sampler { SamplingResult shouldSample( Context parentContext, String traceId, String name, SpanKind spanKind, Attributes attributes, List<LinkData> parentLinks) { System.out.println("attributes.asMap() = " + attributes.asMap()); } }
I print all attributes, the output is: attributes.asMap() = AttributesMap{data={db.system=redis, net.peer.name=localhost, net.transport=ip_tcp, net.peer.ip=127.0.0.1, net.peer.port=6379}, capacity=128, totalAddedValues=5}
there is no db.statement attribute, but there is db.statement attribute in final trace, jaeger snapshot:
I can't drop redis ping operation trace without db.statement attribute.
how can I get the missing attribute?any suggestion?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am developing a sampler to drop some traces that I don't need, e.g: redis ping/pong heartbeat connection.
But I found I can't get the attribute I need in Sampler.shouldSample method:
public class XxxSampler implements Sampler { SamplingResult shouldSample( Context parentContext, String traceId, String name, SpanKind spanKind, Attributes attributes, List<LinkData> parentLinks) { System.out.println("attributes.asMap() = " + attributes.asMap()); } }
I print all attributes, the output is:
attributes.asMap() = AttributesMap{data={db.system=redis, net.peer.name=localhost, net.transport=ip_tcp, net.peer.ip=127.0.0.1, net.peer.port=6379}, capacity=128, totalAddedValues=5}
there is no db.statement attribute, but there is db.statement attribute in final trace, jaeger snapshot:
I can't drop redis ping operation trace without db.statement attribute.
how can I get the missing attribute?any suggestion?
Related issues:#6251
Beta Was this translation helpful? Give feedback.
All reactions