This message was deleted.
# support
s
This message was deleted.
s
Verify that your instrumentation is working by emitting spans to console by changing the exporter to console exporter
a
how to change ? where to change ? any example or reference ?
@Srikanth Chekuri
can you provide the command ?
Copy code
root@simpleui-demo-6b5b566c7-szqgn:/work# OTEL_RESOURCE_ATTRIBUTES=service.name=simpleui-demo-service OTEL_EXPORTER_OTLP_ENDPOINT="<http://my-release-signoz-otel-collector:4317>"  opentelemetry-instrument --traces_exporter otlp_proto_http python manage.py runserver 0.0.0.0:8080
Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).
May 20, 2022 - 14:16:57
Django version 3.2.13, using settings 'simpleui_demo.settings'
Starting development server at <http://0.0.0.0:8080/>
Quit the server with CONTROL-C.
Error: That port is already in use.
@Prashant Shahi @Srikanth Chekuri @Ankit Nayan I tried above, is it help ?
s
Please refer our earlier discussion thread. The port should be 4318 for http exporter
a
Copy code
root@simpleui-demo-6b5b566c7-szqgn:/work# OTEL_RESOURCE_ATTRIBUTES=service.name=simpleui-demo-service OTEL_EXPORTER_OTLP_ENDPOINT="<http://my-release-signoz-otel-collector:4318>"  opentelemetry-instrument --traces_exporter otlp_proto_http python manage.py runserver 0.0.0.0:8081
Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).
May 20, 2022 - 15:48:27
Django version 3.2.13, using settings 'simpleui_demo.settings'
Starting development server at <http://0.0.0.0:8081/>
Quit the server with CONTROL-C.
or
Copy code
OTEL_RESOURCE_ATTRIBUTES=service.name=simpleui-demo-service OTEL_EXPORTER_OTLP_ENDPOINT="<http://my-release-signoz-otel-collector:4318/v1/traces>"  opentelemetry-instrument --traces_exporter otlp_proto_http python manage.py runserver 0.0.0.0:8081
Copy code
root@simpleui-demo-6b5b566c7-szqgn:/work# OTEL_RESOURCE_ATTRIBUTES=service.name=simpleui-demo-service OTEL_EXPORTER_OTLP_ENDPOINT="<http://my-release-signoz-otel-collector:4318/v1/traces>"  opentelemetry-instrument --traces_exporter otlp_proto_http python manage.py runserver 0.0.0.0:8081
Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).
May 20, 2022 - 15:50:05
Django version 3.2.13, using settings 'simpleui_demo.settings'
Starting development server at <http://0.0.0.0:8081/>
Quit the server with CONTROL-C.
I don't get anything in signoz
@Srikanth Chekuri can we have a quick call if possible ?
s
Please try with --traces_exporter console and let me know if it prints traces to console when some endpoints are hit.
a
Copy code
root@simpleui-demo-6b5b566c7-szqgn:/work# OTEL_RESOURCE_ATTRIBUTES=service.name=simpleui-demo-service OTEL_EXPORTER_OTLP_ENDPOINT="<http://my-release-signoz-otel-collector:4318/v1/traces>"  opentelemetry-instrument --traces_exporter console python manage.py runserver 0.0.0.0:8081
Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).
May 20, 2022 - 15:57:20
Django version 3.2.13, using settings 'simpleui_demo.settings'
Starting development server at <http://0.0.0.0:8081/>
Quit the server with CONTROL-C.
let me rebuild application docker and click some link in application to see if help
s
As documented here don't use the reloader https://github.com/open-telemetry/opentelemetry-python/tree/main/docs/examples/django#execution-of-the-django-app. Pass the --noreload to dev server
a
ok let me try
wow
that get something
Copy code
root@simpleui-demo-6b5b566c7-szqgn:/work# OTEL_RESOURCE_ATTRIBUTES=service.name=simpleui-demo-service OTEL_EXPORTER_OTLP_ENDPOINT="<http://my-release-signoz-otel-collector:4318/v1/traces>"  opentelemetry-instrument --traces_exporter console python manage.py runserver --noreload 0.0.0.0:8081
Performing system checks...

System check identified no issues (0 silenced).
May 20, 2022 - 16:03:02
Django version 3.2.13, using settings 'simpleui_demo.settings'
Starting development server at <http://0.0.0.0:8081/>
Quit the server with CONTROL-C.

{
    "name": "SELECT",
    "context": {
        "trace_id": "0xd690e9e71afcf2655c97be3bf2c35ef3",
        "span_id": "0xd205d23ded26252e",
        "trace_state": "[]"
    },
    "kind": "SpanKind.CLIENT",
    "parent_id": null,
    "start_time": "2022-05-20T08:03:02.212245Z",
    "end_time": "2022-05-20T08:03:02.212886Z",
    "status": {
        "status_code": "UNSET"
    },
    "attributes": {
        "db.system": "sqlite",
        "db.name": "",
        "db.statement": "\n            SELECT name, type FROM sqlite_master\n            WHERE type in ('table', 'view') AND NOT name='sqlite_sequence'\n            ORDER BY name"
    },
    "events": [],
    "links": [],
    "resource": {
        "telemetry.sdk.language": "python",
        "telemetry.sdk.name": "opentelemetry",
        "telemetry.sdk.version": "1.9.0",
        "service.name": "simpleui-demo-service",
        "telemetry.auto.version": "0.28b0"
    }
}
{
    "name": "SELECT",
    "context": {
        "trace_id": "0x14182e3df29584936e55835b02698186",
        "span_id": "0x2471620934faf4f0",
        "trace_state": "[]"
    },
    "kind": "SpanKind.CLIENT",
    "parent_id": null,
    "start_time": "2022-05-20T08:03:02.215068Z",
    "end_time": "2022-05-20T08:03:02.215853Z",
    "status": {
        "status_code": "UNSET"
    },
    "attributes": {
        "db.system": "sqlite",
        "db.name": "",
        "db.statement": "SELECT \"django_migrations\".\"id\", \"django_migrations\".\"app\", \"django_migrations\".\"name\", \"django_migrations\".\"applied\" FROM \"django_migrations\""
    },
    "events": [],
    "links": [],
    "resource": {
        "telemetry.sdk.language": "python",
        "telemetry.sdk.name": "opentelemetry",
        "telemetry.sdk.version": "1.9.0",
        "service.name": "simpleui-demo-service",
        "telemetry.auto.version": "0.28b0"
    }
}
but it print to console but not in signoz @Srikanth Chekuri
s
That's the first step in debugging. Now go back and run this
Copy code
OTEL_RESOURCE_ATTRIBUTES=service.name=simpleui-demo-service OTEL_EXPORTER_OTLP_ENDPOINT="<http://my-release-signoz-otel-collector:4318>"
with --traces_exporter otlp_proto_http
a
sure
Copy code
root@simpleui-demo-6b5b566c7-szqgn:/work# OTEL_RESOURCE_ATTRIBUTES=service.name=simpleui-demo-service OTEL_EXPORTER_OTLP_ENDPOINT="<http://my-release-signoz-otel-collector:4318>" opentelemetry-instrument --traces_exporter otlp_proto_http python manage.py runserver --noreload 0.0.0.0:8081
Performing system checks...

System check identified no issues (0 silenced).
May 20, 2022 - 16:06:40
Django version 3.2.13, using settings 'simpleui_demo.settings'
Starting development server at <http://0.0.0.0:8081/>
Quit the server with CONTROL-C.
Failed to export batch code: 404, reason: 404 page not found
still signoz doesn't retrieve any data
s
Because the export failed Failed to export batch code: 404, reason: 404 page not found
Your endpoint setting is not correct
Given endpoint returns 404
a
yes, because of the container already running 8080 application, for testing I have to run another 8081 , is this issue ?
s
I am talking OTEL exporter endpoint setting
a
what endpoint it was referring ?
but your django example is able to send data to signoz
s
Copy the same configuration then
a
it is working for OTEL_EXPORTER_OTLP_ENDPOINT="http://my-release-signoz-otel-collector:4318/v1/traces"
s
Which version of sdk are you using?
a
yes I copied, I used above but failed.
s
Are you running our sample in the same n/w and it's working but not your example?
a
yes
same n/w
Copy code
opentelemetry-distro==0.28b0
opentelemetry-instrumentation==0.28b0
opentelemetry-exporter-otlp==1.9.0
same sdk
s
I don't get it, you share different version differnt times. It was 1.11.1 at some point in our discussion.
a
oh, that one also failed, so I create another django again
so I have 2 django examples
1 is 1.11.1 but it is not workinng, so I am trying to find another django example which use same sdk to have a try
but it is not working either, but you just helped to debug with --traces_exporter console , seems get some progress
s
I am not following. It's vague and difficult because I have no idea what your apps are. See your instrumentation is working we verified it with console. Now your goal is get it work with OTLP exporter. The exporter tried to export but failed 404 error. There is something wrong with host port settings
a
ok so let me rebuld the docker to see if it is working
@Srikanth Chekuri it is working after add
--noreload
thank you very much for you help!
s
Please keep in mind to read the docs on opentelemetry if you run into any issues next time. And don't forget to rebuild your docker images when you make changes.
a
and I will work on another one 🙂 which was 1.11.1 at some point in our discussion. sure I 'll check the doc. but still need some help @Srikanth Chekuri 🙂