Skip to content

Akka HTTP Bad Request 400 is not being traced #5139

Open

Description

@makssobolevs

Description
When Akka HTTP server produces Bad Request 400 due to illegal request there is no trace produced by opentelemetry-javaagent.

Steps to reproduce
See example project https://github.com/makssobolevs/akka-open-telemetry-test

$ curl -v http://localhost:8080/%%
*   Trying 127.0.0.1:8080...
* Connected to localhost (127.0.0.1) port 8080 (#0)
> GET /%% HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.80.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 400 Bad Request
< Server: akka-http/10.2.4
< Date: Sat, 15 Jan 2022 16:33:16 GMT
< Connection: close
< Content-Type: text/plain; charset=UTF-8
< Content-Length: 77
< 
* Closing connection 0

Agent config used:

 "-Dotel.resource.attributes=service.name=test",
 "-Dotel.traces.exporter=logging",
 "-Dotel.traces.sampler=always_on"

What did you expect to see?
I would expect to see span in logs with http.status_code=400

What did you see instead?
I see only akka http warning
[2022-01-15 19:33:16,844] [WARN] [akka.actor.ActorSystemImpl] [Test-akka.actor.default-dispatcher-5] [akka.actor.ActorSystemImpl(Test)] - Illegal request, responding with status '400 Bad Request': Illegal request-target: Invalid input '%', expected HEXDIG (line 1, column 3): /%%

Version
opentelemetry-javaagent 1.9.2
Akka 2.6.14
Akka HTTP 10.2.4
Scala 2.13.5
OpenJDK 11.0.13

Activity

  1. added 4 commits that reference this issue on Aug 26, 2026
    e2af05f
    9e9e422
    b8d58be
    a7ef4a5
  2. added a commit that references this issue on Sep 24, 2026
    d8eff37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcontribution welcomeRequest makes sense, maintainers probably won't have time, contribution would be welcomerepro provided

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions