-
Notifications
You must be signed in to change notification settings - Fork 19
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 otlp_file exporter #154
Conversation
Adding the in-development otlp_file exporter from https://github.com/open-telemetry/opentelemetry-specification/blob/v1.40.0/specification/protocol/file-exporter.md
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.
This makes sense to me. We're still sorting out how to handle configuration for parts of the spec that aren't stable in #142 and we'll need to adjust this new type prior to stabilizing declarative configuration, but I see no reason to not proceed with this as is for now.
examples/kitchen-sink.yaml
Outdated
otlp_file: | ||
# Configure output stream. | ||
# If omitted or null, stdout is used. | ||
output_stream: logs.jsonl |
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're naming this output_stream
, perhaps we should require a scheme to indicate that the stream is a file vs. something else we may support in the future. I.e. file:///logs.jsonl
.
Note: 3 slashes is intentional. First two are for the scheme file://
, third is for the absolute path.
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.
That makes sense, and that does allow for future expansion. I'll document and add examples for file://
. I think that stdout
should be a special case, as it seems simpler than file:///dev/stdout
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.
LGTM, see optional suggestions.
examples/kitchen-sink.yaml
Outdated
otlp_file: | ||
# Configure output stream. | ||
# If omitted or null, stdout is used. | ||
output_stream: metrics.jsonl |
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.
For completeness of the example, add temporality_preference
and default_histogram_aggregation
?
This is the kitchen sink, it should show all settings.
document and add examples for file:// and stdout methods of defining output_stream expand kitchen-sink examples
schema/type_descriptions.yaml
Outdated
- type: OtlpFileExporter | ||
property_descriptions: | ||
output_stream: > | ||
Configure output stream. Values include stdout, or scheme+destination. For example: file:///path/to/file.jsonl. |
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.
#nit: In #151 as a result of feedback about long lines in field descriptions, I adopted a pattern where:
- First line is a terse description of what the field is.
- Details about semantics of the value are broken out on to a separate line.
- Details about default / unset semantics are broken out on to a separate line.
Configure output stream. Values include stdout, or scheme+destination. For example: file:///path/to/file.jsonl. | |
Configure output stream. | |
Values include stdout, or scheme+destination. For example: file:///path/to/file.jsonl. |
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 figure you're offline right now, so I went ahead and pushed a commit to reflect this recommendation to merge. Hope that's ok. 🙂
Adding the in-development otlp_file exporter from https://github.com/open-telemetry/opentelemetry-specification/blob/v1.40.0/specification/protocol/file-exporter.md
output_stream
as the field name to match https://github.com/open-telemetry/opentelemetry-specification/blob/v1.40.0/specification/protocol/file-exporter.md#programmatic-configurationstdout
as the default output stream based on Add OTLP stdout exporter opentelemetry-specification#4183