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

Java Agent Error while sending Data to Open Telemetry Endpoint (OTEL Endpoint) #1406

Closed
ankitk-me opened this issue Feb 17, 2025 · 0 comments · Fixed by #1407
Closed

Java Agent Error while sending Data to Open Telemetry Endpoint (OTEL Endpoint) #1406

ankitk-me opened this issue Feb 17, 2025 · 0 comments · Fixed by #1407
Assignees
Labels
bug Something isn't working

Comments

@ankitk-me
Copy link
Contributor

Discussed in #1400

Originally posted by Gwydiyon February 13, 2025
Hey guys, i am a bit lost. Following error occurs while I try sending Logs and Metrics to an OpenTelemetry Collector from my Zilla.

Error in Log: (

java.lang.NullPointerException: Cannot invoke "Object.hashCode()" because "pk" is null
	at java.base/java.util.ImmutableCollections$MapN.probe(ImmutableCollections.java:1328)
	at java.base/java.util.ImmutableCollections$MapN.get(ImmutableCollections.java:1242)
	at io.aklivity.zilla.runtime.exporter.otlp@0.9.125/io.aklivity.zilla.runtime.exporter.otlp.internal.serializer.OtlpMetricsSerializer$OtlpMetricsDescriptor.nameByBinding(OtlpMetricsSerializer.java:314)
	at io.aklivity.zilla.runtime.exporter.otlp@0.9.125/io.aklivity.zilla.runtime.exporter.otlp.internal.serializer.OtlpMetricsSerializer.serializeScalar(OtlpMetricsSerializer.java:161)
	at io.aklivity.zilla.runtime.exporter.otlp@0.9.125/io.aklivity.zilla.runtime.exporter.otlp.internal.serializer.OtlpMetricsSerializer.serialize(OtlpMetricsSerializer.java:120)
	at io.aklivity.zilla.runtime.exporter.otlp@0.9.125/io.aklivity.zilla.runtime.exporter.otlp.internal.serializer.OtlpMetricsSerializer.lambda$serializeAll$1(OtlpMetricsSerializer.java:92)
	at java.base/java.lang.Iterable.forEach(Iterable.java:75)
	at io.aklivity.zilla.runtime.exporter.otlp@0.9.125/io.aklivity.zilla.runtime.exporter.otlp.internal.serializer.OtlpMetricsSerializer.serializeAll(OtlpMetricsSerializer.java:92)
	at io.aklivity.zilla.runtime.exporter.otlp@0.9.125/io.aklivity.zilla.runtime.exporter.otlp.internal.OltpExporterHandler.exportMetrics(OltpExporterHandler.java:134)
	at io.aklivity.zilla.runtime.exporter.otlp@0.9.125/io.aklivity.zilla.runtime.exporter.otlp.internal.OltpExporterHandler.export(OltpExporterHandler.java:115)
	at io.aklivity.zilla.runtime.engine@0.9.125/io.aklivity.zilla.runtime.engine.internal.exporter.ExporterAgent.doWork(ExporterAgent.java:44)
	at org.agrona.core/org.agrona.concurrent.AgentRunner.doWork(AgentRunner.java:304)
	at org.agrona.core/org.agrona.concurrent.AgentRunner.workLoop(AgentRunner.java:296)
	at org.agrona.core/org.agrona.concurrent.AgentRunner.run(AgentRunner.java:162)
	at java.base/java.lang.Thread.run(Thread.java:1570)
zilla.yaml (Zilla-conf)
telemetry:
    # Desired metrics to track
    metrics:
      - http.request.size
      - http.response.size
      - http.active.requests
      - http.duration
      - stream.active.received
      - stream.active.sent
      - stream.opens.received
      - stream.opens.sent
      - stream.data.received
      - stream.data.sent
      - stream.errors.received
      - stream.errors.sent
      - stream.closes.received
      - stream.closes.sent

    exporters:
      otel_exporter_otlp:
        type: otlp
        options:
          interval: 5
          signals:
            - metrics
            - logs
          endpoint:
            protocol: http
            location: http://otel-gw-collector.esb:4318

  bindings:
    #### EVENT
    openapi_event_rest_server:
      type: openapi
      kind: server
      options:
        specs:
          diip_rest_spec:
            catalog:
              openapi_apicurio:
                subject: event
                version: "1"
            servers:
              - url: http://esb-zilla-event.esb:7114
      exit: event_openapi_asyncapi_mapping
      telemetry:
        metrics:
          - stream.*
otel-collector.conf:
   receivers:
      otlp:
        protocols:
          grpc:
            endpoint: 0.0.0.0:4317
          http:
            endpoint: 0.0.0.0:4318

@ankitk-me ankitk-me added the bug Something isn't working label Feb 17, 2025
@ankitk-me ankitk-me self-assigned this Feb 17, 2025
@jfallows jfallows changed the title Java Agent Error while sending Data to Open Telemtry Endpoint (OTEL Endpoint) Java Agent Error while sending Data to Open Telemetry Endpoint (OTEL Endpoint) Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant