Skip to content

Commit

Permalink
Clarify if statement
Browse files Browse the repository at this point in the history
Co-authored-by: Arend van Beelen jr. <arendjr@gmail.com>
  • Loading branch information
keturiosakys and arendjr authored Sep 25, 2023
1 parent d28378d commit adc8d4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/exporter-otlp-http/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export function init({

const urlObj = new URL(url);

if (!urlObj.pathname.endsWith("/v1/metrics") && !(urlObj.pathname === "/")) {
if (!urlObj.pathname.endsWith(defaultPath) && urlObj.pathname !== "/") {
amLogger.warn(
"Warning: The official OTLP/HTTP endpoint path for metrics is '/v1/metrics', your metrics data might not be submitted properly. See: https://opentelemetry.io/docs/specs/otel/protocol/exporter/#endpoint-urls-for-otlphttp",
);
Expand Down

0 comments on commit adc8d4a

Please sign in to comment.