question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Agent 1.19.0 logs constantly :Failed sending event. Events intake API absolute URL APM Server response: status code: "BadRequest", content:

See original GitHub issue

After Updating to 1.19.0 i keep seeing this log entry. It spamms our logs.

022-12-06 07:02:04.698 +01:00 [ERR] {PayloadSenderV2} Failed sending event. Events intake API absolute URL: "https://xxx/intake/v2/events". 
APM Server response: status code: "BadRequest", content: 

{
	"accepted": 3,
	"errors": [
		{
			"message": "validation error: span: context: destination: service: 'resource' required",
			"document": "{\"span\":{\"context\":{\"destination\":{\"service\":{\"name\":\"\",\"type\":\"\"}},\"service\":{\"target\":{}}},\"duration\":0.4466,\"id\":\"9da85edfa08762a1\",\"name\":\"DefaultCache.Get\",\"outcome\":\"unknown\",\"parent_id\":\"cd08530b299aec19\",\"links\":[],\"sample_rate\":1.0,\"subtype\":\"internal\",\"timestamp\":1670306524063055,\"trace_id\":\"e087644c12d5f4f78c286720da4db9c9\",\"transaction_id\":\"53b3bafa292e366e\",\"type\":\"app\",\"otel\":{\"spanKind\":\"Internal\"}}}"
		}
	]
}

I have not seen this before V1.19.0

Issue Analytics

  • State:closed
  • Created 9 months ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
kuanpakcommented, Dec 28, 2022

I have the same issue with OpenTelemetry Bridge when upgraded to 1.19.0

I think it’s caused by creating span’s Destination with null Resource from ElasticActivityListener below. The resource variable might be null when there is no expected matching tags.

https://github.com/elastic/apm-agent-dotnet/blob/7d29a5e77e7548c8da4dac450ab04dbc8eaaeb8d/src/Elastic.Apm/OpenTelemetry/ElasticActivityListener.cs#L324-L325

Suggest changing to below (create Destination only when resource is not null)

if (resource != null) {
    span.Context.Destination ??= new Destination();
    span.Context.Destination.Service = new Destination.DestinationService { Resource = resource };
}
1reaction
stefannikoleicommented, Dec 22, 2022

@z1c0 Ty. Have nice holidays 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

[BUG] Apm Agent 1.14.0 event sending error on composite ...
Elastic/APM Server Version: 7.16.2 ... Events intake API absolute URL: ... APM Server response: status code: BadRequest, content: ...
Read more >
Common problems | APM Server Reference [7.15]
APM agents communicate with the APM server by sending events in an HTTP request. Each event is sent as its own line in...
Read more >
APM Server response codes | APM User Guide [8.9]
APM agents communicate with the APM server by sending events in an HTTP request. Each event is sent as its own line in...
Read more >
automatic elastic-apm .Net-Agent configuration on k8s
APM Server response : status code: Unauthorized, content: ... Events intake API absolute URL: https://elastic-apm-http:8200/intake/v2/events.
Read more >
Elastic Cloud APM Server - Queue is full
I have many Java microservices running in a Kubernetes Cluster. All of them are APM agents sending data to an APM server in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found