Skip to content
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

in_opentelemetry: fixed the uris used to detect gRPC requests #8697

Merged
merged 1 commit into from
Apr 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion plugins/in_opentelemetry/opentelemetry_prot.c
Original file line number Diff line number Diff line change
Expand Up @@ -2152,7 +2152,11 @@ int opentelemetry_prot_handle_ng(struct flb_http_request *request,
}
else if(strcmp(request->path, "/opentelemetry.proto.collector.metrics.v1.MetricsService/Export") == 0 ||
strcmp(request->path, "/opentelemetry.proto.collector.traces.v1.TracesService/Export") == 0 ||
strcmp(request->path, "/opentelemetry.proto.collector.logs.v1.LogsService/Export") == 0) {
strcmp(request->path, "/opentelemetry.proto.collector.logs.v1.LogsService/Export") == 0 ||
strcmp(request->path, "/opentelemetry.proto.collector.metric.v1.MetricService/Export") == 0 ||
strcmp(request->path, "/opentelemetry.proto.collector.trace.v1.TraceService/Export") == 0 ||
strcmp(request->path, "/opentelemetry.proto.collector.log.v1.LogService/Export") == 0) {

grpc_request = FLB_TRUE;
}
else {
Expand All @@ -2176,16 +2180,19 @@ int opentelemetry_prot_handle_ng(struct flb_http_request *request,
}

if (strcmp(request->path, "/v1/metrics") == 0 ||
strcmp(request->path, "/opentelemetry.proto.collector.metric.v1.MetricService/Export") == 0 ||
strcmp(request->path, "/opentelemetry.proto.collector.metrics.v1.MetricsService/Export") == 0) {
payload_type = 'M';
result = process_payload_metrics_ng(context, context->ins->tag, request, response);
}
else if (strcmp(request->path, "/v1/traces") == 0 ||
strcmp(request->path, "/opentelemetry.proto.collector.trace.v1.TraceService/Export") == 0 ||
strcmp(request->path, "/opentelemetry.proto.collector.traces.v1.TracesService/Export") == 0) {
payload_type = 'T';
result = process_payload_traces_ng(context, context->ins->tag, request, response);
}
else if (strcmp(request->path, "/v1/logs") == 0 ||
strcmp(request->path, "/opentelemetry.proto.collector.log.v1.LogService/Export") == 0 ||
strcmp(request->path, "/opentelemetry.proto.collector.logs.v1.LogsService/Export") == 0) {
payload_type = 'L';
result = process_payload_logs_ng(context, context->ins->tag, request, response);
Expand Down
Loading