https://signoz.io logo
#general
Title
# general
h

Hemant Gupta

08/26/2021, 4:35 PM
Hi Team, can anyone say about how to integrate signoz in existing dockerfile for passing application data as an agent to ui of signoz or how is the flow looking to test it out
a

Ashu

08/26/2021, 4:37 PM
Hi @User Welcome to the SigNoz community! 🙂 @User please help him out.
a

Ankit Nayan

08/26/2021, 4:37 PM
Hey Hemant, Didn't get your question correctly but would like to simplify the setup steps.
1. Install signoz (now you have the IP where SigNoz is hosted)
2. Add opentelemetry library in your application and build the docker image for your application again
3. pass URL of signoz as environment variable to your application
@User which language is your application written in?
h

Hemant Gupta

08/26/2021, 4:39 PM
Thnx Ankit, actually my application are running as java through dockerfile then creating an image now how to embedd the part for it the signoz way of installation
a

Ankit Nayan

08/26/2021, 4:40 PM
ok..
h

Hemant Gupta

08/26/2021, 4:41 PM
Any reference for such setup
a

Ankit Nayan

08/26/2021, 4:41 PM
in dockerfile you specify the run command for you application jar right? In the
RUN
command in dockerfile you need to add below:
Copy code
java -javaagent:/path/to/opentelemetry-javaagent-all.jar \
    -Dotel.metrics.exporter=none \
    -Dotel.exporter.otlp.endpoint=http://<IP of SigNoz Backend>:4317 \
    -Dotel.resource.attributes="service.name=<app_name>" \
    -jar <myapp>.jar
👍 1
or wherever you specify the run command, whether in dockerfile or K8s yaml
let me know if this works 🙂
BTW which framework are you using in java? SpringBoot?
h

Hemant Gupta

08/26/2021, 4:44 PM
Springboot
a

Ankit Nayan

08/26/2021, 4:44 PM
h

Hemant Gupta

08/26/2021, 4:44 PM
Will test it out and come if any issues
a

Ankit Nayan

08/26/2021, 4:45 PM
Sure 🙂
3 Views