-
Notifications
You must be signed in to change notification settings - Fork 6
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
not receiving Data at elastic Side #318
Comments
Please bear in mind that the Elastic agent is meant to be used for native Android projects only, and not for hybrid ones such as Flutter. However, given that Flutter projects contain an Android project inside, I would assume that the Elastic agent could be implemented directly into those to cover the code that's specifically written within said Android projects, though we haven't tested such a use case. Based on the logs that you've shared, it seems like you've already implemented the Elastic agent within your Flutter's Android subproject and that some spans have been created as well, however, when it comes to the server logs, it doesn't seem like those belong to your Android application, this is because there are some missing attributes that we send in every span from our Android agent, and also because the value for the Because of the above, we should start by verifying that your spans are reaching your APM Server. We can start by checking that your APM Server URL and After finding your APM Server URL and secretToken values, you should verify that you're setting them in your Android project, either via the Elastic Android Gradle plugin, as shown here, or, in case you're not using the plugin, you can also set them up manually as explained here. |
Dear, |
Got it, although it's still confusing because, apart from the removed It would be helpful to confirm that the server endpoint/auth values are the ones that show up in Kibana, as per my instructions above, just to discard that it might not be that kind of issue. Also, could you confirm which version of the Elastic Stack are you using? That could help to narrow down the possible causes of this issue. |
yes i confirm that , server url is correct and i am not using auth token in my environment , my elastic version is latest 8.13.4 |
Thank you for confirming. If that's the case, then it doesn't look like there are too many possible causes for this issue, at least on the Elastic agent configuration side of things. Having said that, I'd like to confirm a couple of things, does your APM Server URL starts with |
APM endpoint is HTTP but Public URL is behind proxy which make ssl temination for requests from https to http |
Thank you. Usually, requests to endpoints starting with |
in android endpoint is https not http , as android refuse to send requests to http |
Hi @ahmedhkhalil - Thank you for your patience. I just checked and it seems like there's an issue in our APM Server when using HTTP to export Android telemetry. I'm currently taking a look into it to gather more details, though, in the meantime, if you switch to I'll keep adding updates here as soon as I can find more info on the issue with HTTP. |
hi @LikeTheSalad when we tried grpc we was reciving below error message |
It seems like those logs are related to central config polling, which is a separate request from the traces exporting one. Could you verify if you can see your app listed in Kibana -> Observability -> APM -> Services? |
E/AndroidRuntime( 9291): java.lang.NoClassDefFoundError: Failed resolution of: Lio/opentelemetry/instrumentation/api/internal/SemconvStability; |
hi @LikeTheSalad above is commnet from my college show exception happening when we try to use new SDK v.18 that you just released |
Hi @georgesamirmansour - Thank you for your feedback. I've created this new issue #321 to discuss more about the error that you've experienced, as it's a different one than the one being discussed here. |
Hi @ahmedhkhalil - It seems like there might be some issues with your HAProxy setup when communicating to the APM Server. The changes I've made in the new version |
@LikeTheSalad issue her is that EUM Data Is received successfully without any issue , as i mentioned issue may be on how Android Agent is sending data |
Just to confirm, this is my understanding:
Is that correct? |
Elastic Agent -> Server = works ✅ yes but HTTP traffic only |
I see, thank you. So it seems like you're trying to connect to HAProxy over HTTPS. I think we can verify a couple of things to make sure what's going on:
Those are the possible issues that come to my mind, although there might be specific HAProxy-related configs that I'm not aware of which could be causing other issues. In any case, I think it's worth checking the above items in detail to discard potential root causes. Please bear in mind that the SSL/TLS configuration used by the Elastic Agent is the same as the one provided within the Android OS and there's no custom SSL config provided by the Agent. If you happen to have SSL cert issues, you should take a look at Android's official documentation on how to address them. |
Dears,
we are trying to instrument flutter application using andorid sdk native agent from Elastic we have followed below documentation
https://www.elastic.co/observability-labs/blog/monitoring-android-applications-apm
there is no data appeared on elastic side despite below :
on Android Side we are receiving below warning:
D/ELASTIC_AGENT(19073): Ignoring central config sync request
I/ELASTIC_AGENT(19073): Central config returned max age is null
I/ELASTIC_AGENT(19073): Scheduling next central config poll
D/ELASTIC_AGENT(19073): Next central config poll in 60 seconds
D/ELASTIC_AGENT(19073): Starting span: 'SdkSpan{traceId=e08badad1310d7d54bfb90c72ddd7a82, spanId=a87fee2a479b8368, parentSpanContext=ImmutableSpanContext{traceId=e08badad1310d7d54bfb90c72ddd7a82, spanId=0de1adc07d3f86e1, traceFlags=01, traceState=ArrayBasedTraceState{entries=[]}, remote=false, valid=true}, name=Paused, kind=INTERNAL, attributes=AttributesMap{data={network.carrier.icc=eg, session.id=802fa057-7ba2-4c1f-9146-dcc37aecdf4e, network.carrier.mcc=602, network.connection.type=wifi, type=mobile, network.carrier.name=Orange EG, network.carrier.mnc=01, fragmentName=FlutterFragment}, capacity=128, totalAddedValues=9}, status=ImmutableStatusData{statusCode=OK, description=}, totalRecordedEvents=0, totalRecordedLinks=0, startEpochNanos=1716282098617757968, endEpochNanos=0}', within context: '{opentelemetry-trace-span-key=SdkSpan{traceId=e08badad1310d7d54bfb90c72ddd7a82, spanId=0de1adc07d3f86e1, parentSpanContext=ImmutableSpanContext{traceId=00000000000000000000000000000000, spanId=0000000000000000, traceFlags=00, traceState=ArrayBasedTraceState{entries=[]}, remote=false, valid=false}, name=Paused, kind=INTERNAL, attributes=AttributesMap{data={network.carrier.icc=eg, activityName=MainActivity, session.id=802fa057-7ba2-4c1f-9146-dcc37aecdf4e, network.carrier.mcc=602, network.connection.type=wifi, type=mobile, network.carrier.name=Orange EG, network.carrier.mnc=01, screen.name=MainActivity}, capacity=128, totalAddedValues=11}, status=ImmutableStatusData{statusCode=OK, description=}, totalRecordedEvents=2, totalRecordedLinks=0, startEpochNanos=1716282098614000000, endEpochNanos=0}}'
and on Elastic APM fleet Server i recieve below :
./elastic-agent-20240429-336.ndjson:{"log.level":"info","@timestamp":"2024-04-29T13:17:36.477Z","message":"request ok","component":{"binary":"apm-server","dataset":"elastic_
agent.apm_server","id":"apm-default","type":"apm"},"log":{"source":"apm-default"},"url.original":"/","http.request.method":"POST","user_agent.original":"OTel-OTLP-Exporter-J
ava/1.34.1","http.request.id":"f4c43c38-86f1-4750-928e-cfb726ab38ea","log.origin":{"file.line":62,"file.name":"middleware/log_middleware.go","function":"github.com/elastic/a
pm-server/internal/beater/api.apmMiddleware.LogMiddleware.func1.1"},"log.logger":"request","source.address":"","event.duration":66983,"http.request.body.bytes":
804,"http.response.status_code":200,"ecs.version":"1.6.0","service.name":"apm-server","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2024-05-21T09:58:24.366Z","message":"not modified","component":{"binary":"apm-server","dataset":"elastic_agent.apm_server","id":"apm-default","type":"apm"},"log":{"source":"apm-default"},"url.original":"/config/v1/agents?service.name=####&service.environment=######","log.origin":{"file.line":62,"file.name":"middleware/log_middleware.go","function":"github.com/elastic/apm-server/internal/beater/api.apmMiddleware.LogMiddleware.func1.1"},"service.name":"apm-server","http.request.body.bytes":0,"http.response.status_code":304,"user_agent.original":"Dalvik/2.1.0 (Linux; U; Android 14; SM-S918B Build/UP1A.231005.007)","http.request.id":"13f77e5b-4f72-44b1-9c9a-dc23757123dd","event.duration":61349,"log.logger":"request","http.request.method":"GET","source.address":"197.38.152.50","ecs.version":"1.6.0","ecs.version":"1.6.0"}
Despite that no data shown in elastic or kibana and service not appeared
The text was updated successfully, but these errors were encountered: