-
Notifications
You must be signed in to change notification settings - Fork 9
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
external pluginserver 'elastic-apm' terminated #25
Comments
please see Kong/kong#9301. does your code make panic? |
I do not know,what caused it terminated |
Hi @zffocussss does it consistently terminate after some time, or is it due to specific traffic? |
I think the only fatal is the one here: Unfortunately I don't see an obvious way of overriding this |
Worst case we make a fork and add this instrumentation to help your debugging... |
yes it was terminated after some time,but I do not know why. |
one hour ago,I tried kong 3.0 + this go plugin,the worst thing happened,the output request header traceparent was lost all the time.If you have time I suggest you to try it as well. |
it is running inside kong 2.8.1 |
kong 3.0 have a plugin which support opentelemetry(https://docs.konghq.com/hub/kong-inc/opentelemetry/). Can we use it directly.is it a better way for kong to connect with elastic apm server? |
Lines 392 to 395 in c2f0552
why do you flush and close the tracer after start server? |
Yes we could use it directly... I don't know if they publish the source code of the plugin somewhere? |
I will try it, thanks for the heads up! |
|
source code is put in https://github.com/Kong/kong/blob/master/kong/plugins/opentelemetry/handler.lua |
Can you describe your use case? I have tried forcing kong image to version 3.0 and all seems to work... |
my use case is sending trace info to elastic apm server in order to implement distributed tracing in k8s cluster. internet -> L4 loadBalancer -> kong app gateway -> application service. Maybe it is caused by my k8s cluster. |
@zffocussss btw I still plan to come back to you... I need a bit of time to bump versions in |
Hi, all ✋ I tried to use otel plugin (https://docs.konghq.com/hub/kong-inc/opentelemetry/) base on elk stack 8.5, and get success. here is sample commit. maybe can help.
solution: kong gateway -> otel plugin -> otel collector -> apm server -> elk stack(8.5) ** btw apm-server not support otel in 7.6 ref: |
Hi guys, I'm facing the same problem. UPD.
|
@Dogrtt and @zffocussss sorry I've been neglecting this issue... |
Hi @matthyx , first of all, thank you for your work. |
really? is it stable? |
@zffocussss APM 8+ requires security feature enabled, so, you can't just put your ELK behind Nginx's basic auth, so, I tried it with ELK+APM 7.17.7. In APM's docs related to the OTel, you can find info that APM supports OTLP requests since 7.13 out of the box without any collector service. I tried Kong 3.0.1's opentelemetry plugin with direct pushes to the http://apm_server:8200. My proxied services started receiving "traceparent" headers, but there was no any kong-gateway entrypoint in APM. Traces wasn't available, only agents reports from Python and C# services. Then, I added collector service and it start working. Only one my concern is that traces doesn't recognize URL templates - instead of single trace for http://my_service:80/api/files/{file_id}, it shows all of them with a real id - http://my_service:80/api/files/123, http://my_service:80/api/files/5532, etc. |
so bad |
@Dogrtt @zffocussss thanks for your patience, I have found the issue: Can you try again with the latest code? |
ok let me have a try |
why do you use otel collector? you can send metrics to apm server directly |
hello,In fact,you do not need load elastic-apm any more,as you make the opentelemtry plugin work already. |
Cool! I just follow the doc and set otel-collector-config.yml like this. receivers:
otlp:
protocols:
# grpc:
http:
processors:
batch:
exporters:
logging:
loglevel: debug
otlp/elastic:
endpoint: {your_elastic_apm_endpoint}
tls:
insecure: true
service:
pipelines:
traces:
receivers: [otlp]
exporters: [logging, otlp/elastic]
metrics:
receivers: [otlp]
exporters: [logging, otlp/elastic]
logs:
receivers: [otlp]
exporters: [logging, otlp/elastic]
And I consider elastic-apm must be if I need trace logs. |
you do not need to use a collector to forward your traces data as APM can work with otle plugin |
Would you share your otel plugin config? I can't get it to work with the endpoint https://{apm}/v1/traces. Heres whats in the Kong logs: |
I think I have the plugin setup correctly, but I don't see any traces being sent to APM. My plugin config is below. apiVersion: configuration.konghq.com/v1 I can see the plugin as registered in the Kong console and that looks good. I see some logs like the below indicating that Spans are being traced within Kong. Unfortunately, I see nothing being sent to APM. Any ideas:
|
I actually got this to work. The URL should not have /v1/traces at the end for APM. That being said, I see the traces being accepted by APM, but do not see them in Kibana. We just java agents as well and I do see those services in APM, but nothing for Kong. |
Hi mat:
Recently,I found elastic-apm is not stable,it will be terminated after some hours.any ideas?
logs is below.
The text was updated successfully, but these errors were encountered: