-
The issue otel.service.name=our-app
otel.service.language.name=scala
otel.resource.attributes=service.namespace=APP
otel.metrics.exporter=otlp Whenever we deploy the app it starts exploding with open file descriptors for the application process. Here is the maximum number of file handles for our app: [ouruser@ip-local-ip ~]$ grep "Max open files" /proc/$pid/limits
Max open files 4096 4096 files But as we start the app the number starts slowly growing up. That seems to be linear to receiving new traces/metrics, but we can't prove this: [ouruser@ip-local-ip ~]$ sudo lsof -p $pid | grep "localhost:4317" | wc -l
4299 A typical line in the list of files looks like this: java 16419 ouruser 209u IPv4 15097110 0t0 TCP localhost:56922->localhost:4317 (ESTABLISHED) We have opentelemetry-collector running at Versions Libraries // we use sbt
lazy val otelVersion = "1.12.0"
lazy val otlpMetricsVersion = "1.11.0-alpha"
...
val compileDependencies: Seq[ModuleID] = Seq(
"io.opentelemetry" % "opentelemetry-api" % otelVersion,
"io.opentelemetry" % "opentelemetry-exporter-otlp" % otelVersion,
"io.opentelemetry" % "opentelemetry-exporter-otlp-metrics" % otlpMetricsVersion,
"io.opentelemetry" % "opentelemetry-extension-annotations" % otelVersion,
"io.opentelemetry" % "opentelemetry-sdk" % otelVersion,
"io.opentelemetry" % "opentelemetry-sdk-metrics" % otlpMetricsVersion,
"io.opentelemetry.instrumentation" % "opentelemetry-logback-mdc-1.0" % otlpMetricsVersion, Agent -javaagent:src/pack/lib/opentelemetry/opentelemetry-javaagent-all-v1.11.1.jar Otel Collector (through 🐳 ): otel-collector:
container_name: otel-collector
image: otel/opentelemetry-collector-contrib:0.46.0
command: [ "--config=/etc/otel-collector-config.yml" ]
working_dir: "/project"
volumes:
- ${PWD}/:/project
- ./otel-collector-config.yml:/etc/otel-collector-config.yml
- ./company/opentelemetry-jmx-metrics.jar:/opentelemetry-jmx-metrics.jar
ports:
- "4317:4317"
- "4318:4318"
depends_on:
- apm-server
networks:
- elastic Environment [Updated] Also attaching a sanitized copy of our receivers:
otlp/receiver:
protocols:
grpc:
http:
exporters:
otlp/elastic:
endpoint: <REDACTED>
headers:
Authorization: "Bearer <REDACTED>"
logging:
processors:
batch:
timeout: 10s
memory_limiter:
check_interval: 1s
limit_mib: 200
spike_limit_mib: 100
resource:
attributes:
- key: deployment.environment
value: <REDACTED>
action: upsert
- key: service.environment
value: <REDACTED>
action: upsert
service:
pipelines:
traces:
receivers: [otlp/receiver]
processors: [memory_limiter,batch,resource]
exporters: [otlp/elastic]
metrics:
receivers: [otlp/receiver]
processors: [memory_limiter,batch,resource]
exporters: [otlp/elastic] |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hi @vasigorc - are you initializing the SDK in the code and also using the javaagent? This is not correct usage - we'd expect your list of dependencies to only include |
Beta Was this translation helpful? Give feedback.
Hi @vasigorc - are you initializing the SDK in the code and also using the javaagent? This is not correct usage - we'd expect your list of dependencies to only include
opentelemetry-api
and nothing else. If you are initializing the SDK, maybe we can start by removing that and see if the issue still remains?