Comments (9)
Suggest we make the JSON formatter for logging have a section that specifies allowed attributes.
from router.
@BrynCooke That would add the value to all spans, but it does not get included in all text logs from Router. I want all logs, including ones internal to the Router debugging, to have some standard attributes
from router.
In theory this should give you what you need:
telemetry:
instrumentation:
spans:
mode: spec_compliant
router:
attributes:
shanes-custom-correlation-id:
request_header: "x-correlation-id"
Span attributes are included on log events under the span_list
key.
Resources are intentionally static and are sent in the envelope of otel payloads rather than on individual events/traces/metrics
from router.
Oh wait, I think I missed the key part there. There is a setting in the Router log configuration that allows you to include the span information IN the logs meaning that I can add standard attribute if they exist in the spans, correct?
telemetry:
instrumentation:
spans:
mode: spec_compliant
default_attribute_requirement_level: recommended
# Set values to add to all the different spans
router:
attributes:
"shanes-custom-id":
request_header: "x-shane-id"
exporters:
logging:
stdout:
enabled: true
format:
json:
# Include span info in logs
display_current_span: true
display_span_list: true
Does this only get included as part of the standard router
, supergraph
, and subgraph
spans though? What about logs that happen during query planning?
from router.
One down side to this current configuration option is that is still logs all the span attributes which could be quite large. If I just need one header value to exist in the logs, and ideal configuration as proposed could be a lot smaller and use less resources
from router.
Yeah, span list contains all the span data for all nested spans. I could see us adding something to allow more targeted attributes here.
from router.
@bnjjj Does this tie into any other work?
from router.
@abernix no I don't think so
from router.
It could be solved with this #5387
from router.
Related Issues (20)
- Refactor new telemetry module
- Add a conditional static selector to be able to conditionally set an attribute on instruments
- GRAPHQL_VALIDATION_FAILED returned when a field with variables is filtered out due to authN/Z directives HOT 2
- Helm chart: Support custom path for health check
- Add custom header option to opentelemetry jaeger propagator HOT 1
- Helm chart: Support custom key name used for secret key lookup for APOLLO_KEY
- Helm chart: Support providing RollingUpdate maxSurge and maxUnavailable values
- telemetry: `exists` condition is not triggered with some custom events
- OTLP exporter port default does not match tonic vs http HOT 1
- Send cost complexity to coprocessor/rhai for custom enforcement
- External Coprocessor: Support for connections to be made with Unix Domain Sockets
- ease of use: debug mode HOT 3
- Add top level log attributes HOT 1
- Router Fails to Recognize content-type Header in Federated Service Responses Without Payloads HOT 1
- Proxy Support for uplink and subgraphs HOT 1
- Coprocessor docs mismatch implementation about `id` property in a few ways
- Add log and warn-only mode for parser_max_recursion
- Returns null for interface entity when it is resolved before a nested entity HOT 1
- document different formats for `display_trace_id`
- Provide a config to supress the 'Did you mean' message for GRAPHQL_VALIDATION_FAILED HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from router.