Grafana Agent Flow returns Not Allowed when called with http OPTIONS (Angular + OTLPTraceExporter)

Hi guys,
I am using Grafana Agent Flow installed as a Windows Service on the development mashine. I have configured it with the .river config to send the traces to Grafana Cloud Loki. OpenTelemetry data is sent from an Angular App on the same host via http/protobuf to the agent and the agent should then transfer the Loki events to the cloud…

AngularApp(OpenTelemtrySDK) → Grafana Agent Flow ->Grafana Loki (Cloud)

This is how I configure the exporter:
new OTLPTraceExporter({
url: ‘http://localhost:4318/v1/traces’,
}),

When Angular/OpenTelemtryExporter tries to send traces it makes OPTION call first. The Grafana agent server returns HTTP/1.1 405 Method Not Allowed

If I try making POST via Fiddler I can make a request but I get “partialSuccess”, but I think this has just something to do with the payload im am posting.
Any ideas?
Thanks!

It looks like you are mixing traces (storage Tempo) with logs (storage Loki). Make sure you are using right storage for right signals.

BTW: there is Faro, which may be a better choice for frontend observability.

UPDATE: I have added the following configuration entries for preflight requests (CORS) into the config.river.

http { 
		cors { 
			allowed_origins = ["http://localhost:xxx"]	
		}
	}

Now I do get 204 No Content in return, and POST is called afterwards. However, the Response is

HTTP/1.1 200 OK
{"partialSuccess":{}}

And I do not see any data colleted in the Grafana Explorer. What does partialSuccess mean? How can I tell if the agent is trying to forward data to Loki endpoint? Can I enable debug mode/logging somehow?

Thanks, I will take a look into that.

Silly question, but I haven’t found any answer by myself: Does using the Faro with local Grafana Agent still requires an agent to be run in the old “static” mode?