-
Notifications
You must be signed in to change notification settings - Fork 272
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
Improve / formalize configuration of telemetry / logging / observability / metrics / tracing #3226
Comments
I suggest to use format:
json:
location: true | false
filename: true | false
line_number: true | false
spans: true | false
# text:
# location: true | false
# filename: true | false
# line_number: true | false
# spans: true | false it's also related to the discussion #1961 |
Should we close #1840 since its ideas have been folded into the above? |
This request include another way to send logs to? |
Not currently. But let's add it as this could be implemented using https://github.com/tokio-rs/tracing/tree/master/tracing-appender |
Hi, I can be wrong, but does the new logging configuration support injecting custom fields into JSON? |
Let's add this, I''ll have a think about how to update the config. |
pointing out now that any initiative around logging configuration has a huge risk of destroying performance, so this should be built carefully |
Would also be cool if field names could be specified, i.e. to fit into a certain log structure, which would be necessary to make logs searchable/indexable. The example below would "rename" format:
json:
- type: spans
name: spans
- type: message
name: msg Wording of |
Hello, my issue #3502 was linked here. I think that if I were to propose a location for this issue, maybe
would be the proper place? That would require you to change |
I've spent some time thinking about this and updated the example. |
Our usecase is to follow company-wide log formats so that log lines are indexed properly. Being able to select and naming fields would be nice (as outlined in #3226 (comment)), as well as populating specific fields with static fields. Though I can see how the latter may be a little too specific. |
same usecases here (naming fields + adding static fields) |
Can you post some examples of the formats that you are seeking to work with? |
`flatten` doesn't do what we want. Implement custom deserializer and add tests. Part of #3226
`flatten` doesn't do what we want. Implement custom deserializer and add tests. Part of #3226
Serde `flatten` doesn't do what we want it to do. Custom `Deserializer` that will to the right thing, first trying a custom attribute and then a standard attribute. Part of #3226 <!-- start metadata --> --- **Checklist** Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review. - [ ] Changes are compatible[^1] - [ ] Documentation[^2] completed - [ ] Performance impact assessed and acceptable - Tests added and passing[^3] - [ ] Unit Tests - [ ] Integration Tests - [ ] Manual Tests **Exceptions** *Note any exceptions here* **Notes** [^1]: It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this. [^2]: Configuration is an important part of many changes. Where applicable please try to document configuration examples. [^3]: Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions. Co-authored-by: bryn <[email protected]>
Many of the features are not implemented yet and will be enabled over time. Part of #3226
Many of the features are not implemented yet and will be enabled over time. Part of #3226
Note that this code is not currently used, but is needed for the other telemetry PR changes. Various issues with telemetry next config were discovered during documentation. The code changes are addressed in this PR with a separate docs PR in the works. Part of #3226 <!-- start metadata --> --- **Checklist** Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review. - [ ] Changes are compatible[^1] - [ ] Documentation[^2] completed - [ ] Performance impact assessed and acceptable - Tests added and passing[^3] - [ ] Unit Tests - [ ] Integration Tests - [ ] Manual Tests **Exceptions** *Note any exceptions here* **Notes** [^1]: It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this. [^2]: Configuration is an important part of many changes. Where applicable please try to document configuration examples. [^3]: Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions. Co-authored-by: bryn <[email protected]>
Just a quick update for people following this ticket. We've spent considerable effort to make telemetry spans customizable via yaml and to follow the Otel semantic conventions. This will land in the next release. Users with a commercial license will have fine grained control over what span attributes are present on spans and are able to attach arbitrary attributes. Free users are able to use the less granular Still TODO are instrument and event customization via yaml. We are hoping to get to these early next year, as they will allow users to setup conditional logging and metrics without having to reach for Rhai or a custom plugin. Custom logging formats are also still on the table as well as exporting logs via opentelemetry bridge for collection via OTLP. |
Another update on this ticket. One thing that is still unimplemented is redaction. So if you need this then get in touch. |
@BrynCooke What about #3502 ? |
@oskargotte We haven't has many folks asking for redaction. Some of them do redaction centrally via their logging software. We'll still need more people to ask for this feature. |
FWIW, logging redaction isn't really a standard feature for many programs that exist today, so it's understandable that this won't be supported. |
Currently we have an
experimental_logging
section that we should bring out of experimental and in addition support json formatting options. There have also been several other users asking for much more control over what is output in both spans and logs, so it's maybe time to take a more holistic look.The things that users have asked us for are:
supergraph
span is wrapped in anoperation
span that follows semantic conventions. Existing attributes on supergraph that are from semantic conventions are moved onto the new span.* Log levels are made easier to use. (see below yaml)Config
Suggest the following format:
Related is: #1840 which also has some good ideas that have been folded into the above.
Path forward
This is a fairly large set of changes and will need to be split into several tickets. Let's get agreements that this is the way forward and try and schedule it in as it is a blocker for some users to adoption and could have some major performance improvement ramifications due to reduced logging requriements.
Related issues
Implementation plan
There are a large number of items that need to be tackled. Once the new config structure has been implemented then we can start farming the tasks out to separate people.
Clean up existing config
enabled
field for telemetry exporters #3952New config structure
Spans
DynAttribute
functionality to spans and logs #4096legacy_request_span
functionality. Remove existing Make span to router_service. #4085Tracing
Testing
Logging
Instruments
Events
The text was updated successfully, but these errors were encountered: