-
Notifications
You must be signed in to change notification settings - Fork 424
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
No way to construct LogData #1217
Comments
Can you elaborate on your use case - are you writing a log exporter and want to construct it for testing? The |
My use case is manually sending out logs and traces and handle errors individually. I'm building a service that sends logs and traces to our customers, each of which can configure their own endpoints (only OTLP for now). What this means is that I'm multiplexing between customer endpoints and need to explicitly handle errors when sending the data to a customer. Basically my service exposes a REST API, that is called with a piece of telemetry data and the configuration of the customer endpoint and I need to respond with a success or error HTTP response depending on whether the telemetry data was successfully delivered to that customer. I can't rely on the regular |
Note that |
Ok thanks for the details. Feel free to raise a PR to remove the |
Done.
Yeah, that is fine, I can adapt when changes happen. |
There is currently no way to construct
LogData
directly, but I need it to feed aLogExporter
with.The issue is that there is no constructor and constructing it directly is prevented by the
#[non_exhaustive]
attribute.There's a workaround, but it's absolutely less than pretty (the workaround is to create a fake
LogProcessor
and abuse aLoggerProvider
to construct theLogData
for us):The text was updated successfully, but these errors were encountered: