mirror of
https://github.com/hanzoai/telemetry.git
synced 2026-10-30 20:01:49 +00:00
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description In the CollectorSettings LoggingOptions, when the options are `zap.WrapCore`, the final core wrapped will end up running first. For this reason, the windowsEventLogCore must be the first option in the list of user supplied options, to ensure user supplied options are run before the core that writes to the Windows Event Log. Prior art: I fixed this before in #5298. <!-- Issue number if applicable --> #### Link to tracking issue #5297 <!--Describe what testing was performed and which tests were added.--> #### Testing Testing was manual by running the Collector as a service after this change. I tried to add a unit test but could not find an effective way to do that due to all the type indirection done by the `zap` package. I was hoping to find an easy way to tell that the `windowsEventLogCore` is the first core wrapped in the options but I could not find a way to pull that off. Open to ideas if anyone can find a way.
31 lines
496 B
YAML
31 lines
496 B
YAML
extensions:
|
|
zpages:
|
|
|
|
receivers:
|
|
otlp:
|
|
protocols:
|
|
grpc:
|
|
http:
|
|
|
|
exporters:
|
|
debug:
|
|
verbosity: detailed
|
|
|
|
service:
|
|
telemetry:
|
|
logs:
|
|
level: info
|
|
output_paths:
|
|
# The folder need to be created prior to starting the collector
|
|
- ${ProgramData}\OpenTelemetry\Collector\Logs\otelcol.log
|
|
|
|
pipelines:
|
|
traces:
|
|
receivers: [otlp]
|
|
exporters: [debug]
|
|
metrics:
|
|
receivers: [otlp]
|
|
exporters: [debug]
|
|
|
|
extensions: [zpages]
|