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.
TypeScript apmapplication-monitoringdistributed-tracinggogood-first-issuejaegerloglogsmetricsmonitoringnextjsobservabilityopen-sourceopentelemetryprometheusreactreactjsself-hostedtracingtypescript
feat(global): add ai assistant url to global config (#11171)
Vishal Sharma8a7793794d18
diff --git a/conf/example.yaml b/conf/example.yamlindex b35e05947f..106d8b49a9 100644--- a/conf/example.yaml+++ b/conf/example.yaml@@ -13,6 +13,8 @@ global:ingestion_url: <unset># the url of the SigNoz MCP server. when unset, the MCP settings page is hidden in the frontend.# mcp_url: <unset>+ # the url of the SigNoz AI Assistant server. when unset, the AI Assistant is hidden in the frontend.+ # ai_assistant_url: <unset>##################### Version #####################version:diff --git a/docs/api/openapi.yml b/docs/api/openapi.ymlindex d74ac55a60..99dd550ce8 100644--- a/docs/api/openapi.yml+++ b/docs/api/openapi.yml@@ -2494,6 +2494,9 @@ components:type: objectGlobaltypesConfig:properties:+ ai_assistant_url:+ nullable: true+ type: stringexternal_url:type: stringidentN:@@ -2507,6 +2510,7 @@ components:- external_url- ingestion_url- mcp_url+ - ai_assistant_urltype: objectGlobaltypesIdentNConfig:properties:diff --git a/frontend/src/api/generated/services/sigNoz.schemas.ts b/frontend/src/api/generated/services/sigNoz.schemas.tsindex dd65e72712..5fbf5fa5f2 100644--- a/frontend/src/api/generated/services/sigNoz.schemas.ts+++ b/frontend/src/api/generated/services/sigNoz.schemas.ts@@ -4614,6 +4614,11 @@ export interface GlobaltypesAPIKeyConfigDTO {}export interface GlobaltypesConfigDTO {+ /**+ * @type string+ * @nullable true+ */+ ai_assistant_url: string | null;/*** @type string*/diff --git a/pkg/global/config.go b/pkg/global/config.goindex 5579821cfa..89580cd3ff 100644--- a/pkg/global/config.go+++ b/pkg/global/config.go@@ -15,9 +15,10 @@ var ()type Config struct {- ExternalURL *url.URL `mapstructure:"external_url"`- IngestionURL *url.URL `mapstructure:"ingestion_url"`- MCPURL *url.URL `mapstructure:"mcp_url"`+ ExternalURL *url.URL `mapstructure:"external_url"`+ IngestionURL *url.URL `mapstructure:"ingestion_url"`+ MCPURL *url.URL `mapstructure:"mcp_url"`+ AIAssistantURL *url.URL `mapstructure:"ai_assistant_url"`}func NewConfigFactory() factory.ConfigFactory {diff --git a/pkg/global/signozglobal/provider.go b/pkg/global/signozglobal/provider.goindex 5a6401585d..35c59caefb 100644--- a/pkg/global/signozglobal/provider.go+++ b/pkg/global/signozglobal/provider.go@@ -37,8 +37,19 @@ func (provider *provider) GetConfig(context.Context) *globaltypes.Config {mcpURL = &s}+ var aiAssistantURL *string+ if provider.config.AIAssistantURL != nil {+ s := provider.config.AIAssistantURL.String()+ aiAssistantURL = &s+ }+return globaltypes.NewConfig(- globaltypes.NewEndpoint(provider.config.ExternalURL.String(), provider.config.IngestionURL.String(), mcpURL),+ globaltypes.NewEndpoint(+ provider.config.ExternalURL.String(),+ provider.config.IngestionURL.String(),+ mcpURL,+ aiAssistantURL,+ ),globaltypes.NewIdentNConfig(globaltypes.TokenizerConfig{Enabled: provider.identNConfig.Tokenizer.Enabled},globaltypes.APIKeyConfig{Enabled: provider.identNConfig.APIKeyConfig.Enabled},diff --git a/pkg/types/globaltypes/endpoint.go b/pkg/types/globaltypes/endpoint.goindex 9a6f47b47c..704a74f6cd 100644--- a/pkg/types/globaltypes/endpoint.go+++ b/pkg/types/globaltypes/endpoint.go@@ -1,15 +1,17 @@package globaltypestype Endpoint struct {- ExternalURL string `json:"external_url" required:"true"`- IngestionURL string `json:"ingestion_url" required:"true"`- MCPURL *string `json:"mcp_url" required:"true" nullable:"true"`+ ExternalURL string `json:"external_url" required:"true"`+ IngestionURL string `json:"ingestion_url" required:"true"`+ MCPURL *string `json:"mcp_url" required:"true" nullable:"true"`+ AIAssistantURL *string `json:"ai_assistant_url" required:"true" nullable:"true"`}-func NewEndpoint(externalURL, ingestionURL string, mcpURL *string) Endpoint {+func NewEndpoint(externalURL, ingestionURL string, mcpURL, aiAssistantURL *string) Endpoint {return Endpoint{- ExternalURL: externalURL,- IngestionURL: ingestionURL,- MCPURL: mcpURL,+ ExternalURL: externalURL,+ IngestionURL: ingestionURL,+ MCPURL: mcpURL,+ AIAssistantURL: aiAssistantURL,}}