Skip to content

apm-server replies with http400 - Problem validating JSON document #72

@MarcoAbi

Description

@MarcoAbi

Hello,

I'm trying to send a custom transaction to apm through the Java Agent.
However I'm experiencing problems and for every transaction I close, the server replies http400 with this error on console:

ERROR [request] beater/handlers.go:384 error handling request {"request_id": "3be3e112-466c-463a-b011-61284ed52d31", "error": "Problem validating JSON document against schema: I[#] S[#] doesn't validate with \"transaction#\"\n I[#/transactions/0/context/request] S[#/properties/transactions/items/properties/context/properties/request/required] missing properties: \"method\""}

this is how I'm instrumenting and starting the Agent:

private static ElasticApm elasticApm;

...

Transaction apmTransaction = elasticApm.startTransaction();
apmTransaction.setName("testTransaction");
apmTransaction.setType("test");
apmTransaction.setUser("auto", "auto@example.com", "auto");

//Business Code

apmTransaction.close();

while elasticapm.properties looks like this:

service_name=kpicalculator
service_version=1.0.0
application_packages=a.b.c
environment=sand
server_url=http://xxx.xxx.xxx.xxx:8200

Now I'm using apm-server v6.2.4 with docker, however the same issue happens with all the server versions (I've tried from 6.0.0 to 6.2.4)

Am I missing something with the configuration?

Thanks a lot for your help!

Best
Marco

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions