Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

docs: add servers block to the openapi spec (#11129)

Pandey738ae6f21b05
diff --git a/docs/api/openapi.yml b/docs/api/openapi.yml
index 9c83c968bd..8617c30370 100644
--- a/docs/api/openapi.yml
+++ b/docs/api/openapi.yml
@@ -5296,7 +5296,12 @@ components:
scheme: bearer
type: http
info:
+ contact:
+ name: SigNoz Support
+ url: https://signoz.io
description: OpenTelemetry-Native Logs, Metrics and Traces in a single pane
+ termsOfService: https://signoz.io/terms-of-service/
title: SigNoz
version: ""
openapi: 3.0.3
@@ -17512,3 +17517,16 @@ paths:
summary: Replace variables
tags:
- querier
+servers:
+- description: The fully qualified URL to the SigNoz APIServer.
+ url: https://{host}:{port}{base_path}
+ variables:
+ base_path:
+ default: /
+ description: The base path of the SigNoz APIServer
+ host:
+ default: localhost
+ description: The host of the SigNoz APIServer
+ port:
+ default: "8080"
+ description: The port of the SigNoz APIServer
diff --git a/pkg/signoz/openapi.go b/pkg/signoz/openapi.go
index 5e272670e4..b5d2ea9b69 100644
--- a/pkg/signoz/openapi.go
+++ b/pkg/signoz/openapi.go
@@ -98,8 +98,31 @@ func NewOpenAPI(ctx context.Context, instrumentation instrumentation.Instrumenta
return defaultDefName
}))
- reflector.SpecSchema().SetTitle("SigNoz")
- reflector.SpecSchema().SetDescription("OpenTelemetry-Native Logs, Metrics and Traces in a single pane")
+ reflector.Spec.WithInfo(*(&openapi3.Info{}).
+ WithTitle("SigNoz").
+ WithDescription("OpenTelemetry-Native Logs, Metrics and Traces in a single pane").
+ WithTermsOfService("https://signoz.io/terms-of-service/").
+ WithContact(*(&openapi3.Contact{}).
+ WithName("SigNoz Support").
+ WithURL("https://signoz.io").
+ WithEmail("[email protected]")),
+ )
+
+ reflector.Spec.WithServers(
+ // Default server
+ *(&openapi3.Server{}).WithURL("https://{host}:{port}{base_path}").
+ WithDescription("The fully qualified URL to the SigNoz APIServer.").
+ WithVariablesItem("host", *(&openapi3.ServerVariable{}).
+ WithDefault("localhost").
+ WithDescription("The host of the SigNoz APIServer")).
+ WithVariablesItem("port", *(&openapi3.ServerVariable{}).
+ WithDefault("8080").
+ WithDescription("The port of the SigNoz APIServer")).
+ WithVariablesItem("base_path", *(&openapi3.ServerVariable{}).
+ WithDefault("/").
+ WithDescription("The base path of the SigNoz APIServer")),
+ )
+
reflector.SpecSchema().SetAPIKeySecurity(authtypes.IdentNProviderAPIKey.StringValue(), "SigNoz-Api-Key", openapi.InHeader, "API Keys")
reflector.SpecSchema().SetHTTPBearerTokenSecurity(authtypes.IdentNProviderTokenizer.StringValue(), "Tokenizer", "Tokens generated by the tokenizer")