-
Notifications
You must be signed in to change notification settings - Fork 131
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 file configuration example #207
Add file configuration example #207
Conversation
processors: | ||
- batch: | ||
exporter: | ||
console: {} |
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.
what does {}
mean? is that a yaml thing? thx
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.
YAML is a superset of JSON, and {}
is an empty object in json.
The way that the jackson unmarshaling works, if I omit the empty object, then the console property of the exporter object will be null, leaving no indication that the user configured the exporter to be console.
exporter:
console:
// Results in exporter.getConsole() == null
exporter:
console: {}
// Results in exporter.getConsole() != null
Maybe there's a way to configure jackson such that the {}
isn't needed 🤔
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.
Maybe there's a way to configure jackson such that the
{}
isn't needed 🤔
this would be nice, I could see this being a common use confusion, and I don't recall the collector yaml configuration needing these
file-configuration/src/main/java/io/opentelemetry/examples/fileconfig/Application.java
Outdated
Show resolved
Hide resolved
// shutdown to ensure data is flusehdd | ||
openTelemetrySdk.shutdown().join(10, TimeUnit.SECONDS); |
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.
does ConfigurationFactory use autoconfigure under the hood? (wondering since I think autoconfigure registers flushing shutdown hook?)
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.
No it doesn't, I need to update ConfigurationFactory to register shutdown hooks!
Leaving as draft for now as this depends on code which has yet to be released.