Skip to content
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

Otel collector pod not able to collect msges from nlog config for otel #35732

Open
ashwinpagarkhed opened this issue Oct 10, 2024 · 3 comments
Open
Labels
needs triage New item requiring triage receiver/otlpjsonfile

Comments

@ashwinpagarkhed
Copy link

ashwinpagarkhed commented Oct 10, 2024

Nlog collector for otel

receiver/otlpjsonfile

Otel collector pod not able to collect msges from nlog config for otel

We have a central otel collector in a k8s cluster which is collecting metrics and logs from miccroservices from other k8s cluster. This works fine. However we have a few apps which have nlog logging all application logs to a storage account/eventhub.Now we want to get all the nlog logs through otel

This is the nlog.config file for the xml config for the otel collector as per this:

<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
      autoReload="true"
      internalLogFile="C:/home/LogFiles/NLog/Internal-otel-final.txt" 
      internalLogLevel="Trace">
 <extensions>
        <add assembly="NLog.Targets.OpenTelemetryProtocol"/>
 </extensions>
<targets>
        <target xsi:type="OtlpTarget"
        name="otlp"
        endpoint="http://nlog.istio.acs314159.com"
        usehttp="true"
        servicename="Bkg"
        resources="process.name=${processname};process.id=${processid};deployment.environment=ashwindev"
        attributes="thread.id=${thread.id}"
        scheduledDelayMilliseconds="1000"
        useDefaultResource="false"
        includeFormattedMessage="true"/>
</targets>
 <rules>
       <logger name="*" minlevel="Debug" writeTo="otlp"/>
</rules>
</nlog>

the internal file for nlog (used to troubleshoot nlog config errors) shows no error with this current config values .

This is the curretn configs of the otel config:

 data:
  relay: >
    exporters:
      debug:
        verbosity: detailed
      otlphttp:
        endpoint: http://signoz.istio-kubernetes-gateway-otel.acs314159.com
    processors:
      batch: {}
    receivers:
      otlp:
        protocols:
          grpc:
            endpoint: ${env:MY_POD_IP}:4317
          http:
            endpoint: ${env:MY_POD_IP}:4318

    service:
      pipelines:
        logs:
          exporters:
          - otlphttp
          processors:
          - batch
          receivers:
          - otlp
        metrics:
          exporters:
          - otlphttp
          processors:
          - batch
          receivers:
          - otlp
        metrics/am:
          exporters:
          - otlphttp
          receivers:
          - otlp
        traces:
          exporters:
          - otlphttp
          processors:
          - batch
          receivers:
          - otlp

The image for the olte deployment is : otel/opentelemetry-collector-contrib:0.110.0

with this setup we are not able to recieve any msges in the otel collector(checked after adding debug to exporter and checking in the logs). Any help here would be appreciated! Thanks

@ashwinpagarkhed ashwinpagarkhed added the needs triage New item requiring triage label Oct 10, 2024
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@snakefoot
Copy link

snakefoot commented Oct 18, 2024

From: https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/README.md#troubleshooting

Notice the opentelemetry-component uses an EventSource with the name "OpenTelemetry-Exporter-OpenTelemetryProtocol" for its internal logging. Please refer to SDK troubleshooting for instructions on seeing these internal logs.

@atoulme
Copy link
Contributor

atoulme commented Oct 29, 2024

Apologies, no idea what this is about. Please rephrase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage New item requiring triage receiver/otlpjsonfile
Projects
None yet
Development

No branches or pull requests

3 participants