-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: Allow Disabling the default Exporter #328
Conversation
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 am also not married to the name but I think this is one of those things where there is no perfect name and we could spend weeks bikeshedding about it.
The current name is Fine™️
I vote we ship it!
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 works as advertised (esp in conjunction with traceExporters
option). I'm curious if it's more inline with exceptions where folks can set the default exporter like this:
const sdk = new HoneycombWebSDK({
apiKey: 'someKey // Replace with your Honeycomb Ingest API Key
serviceName: 'coolApp',
defaultExporter: MyDefaultTraceExporter(),
traceExporters: [ExporterMcExporteryFace(), TraceExporter2()]
...
}
And disable it with:
const sdk = new HoneycombWebSDK({
apiKey: 'someKey // Replace with your Honeycomb Ingest API Key
serviceName: 'coolApp',
defaultExporter: null,
traceExporters: [ExporterMcExporteryFace(), TraceExporter2()]
...
}
I wonder if @pkanal or @martin308 have any instincts here. 🤔
@wolfgangcodes I'm strongly in favour of the |
Co-authored-by: Wolfgang Therrien <[email protected]>
Only thing I am going to change is |
configureHoneycombHttpJsonTraceExporter(options), | ||
); | ||
} | ||
|
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.
We may want a check/logger statement here so that if folks disable the default exporter AND the don't provide any other exporters, there's at least something that's like console.warn("You gots no exporters configured.")
Which problem is this PR solving?
We have had a few requests come in asking for the ability to disable the default exporter. This makes it possible through a new property in the configuration.
Short description of the changes
This adds a new SDK configuration property
disableDefaultTraceExporter
that, when set to true will disable the default exporter.How to verify that this has the expected result
Provide this boolean as
true
in an example and note no events are sent to honeycomb.