jaeger-operator icon indicating copy to clipboard operation
jaeger-operator copied to clipboard

[Feature]: Add PROMETHEUS_SERVER_URL to jaeger query spec

Open thomaspaulin opened this issue 1 year ago • 6 comments

Requirement

As a Jaeger operator with an independently deployed Prometheus I want to specify where my Prometheus lives so that I make use of Service Performance Monitoring of my services from within the Jaeger UI

Problem

We can specify that we should be using Prometheus, but not how to reach Prometheus, despite it being to the metricsStorage option.

Proposal

Add the PROMETHEUS_SERVER_URL setting at the same level as METRICS_STORAGE_TYPE one, a la

query:
  metricsStorage: 
    type: prometheus
    server-url: <my-prometheus-here>:9090

Open questions

No response

thomaspaulin avatar Apr 03 '23 16:04 thomaspaulin

Would you like to send a PR?

iblancasa avatar Jun 26 '23 20:06 iblancasa

Hi, if this is not assigned can i take it.

antoniomerlin avatar Feb 12 '24 05:02 antoniomerlin

Hi, @iblancasa is the spec structure is fine:-

apiVersion: jaegertracing.io/v1
kind: Jaeger
metadata:
  name: simplest
  namespace: observability
spec:
  allInOne:
    metricsStorage:
      type: prometheus
      server-url: http://prometheus:9090 // This would be attach to container as PROMETHEUS_SERVER_URL env variable.

antoniomerlin avatar Feb 22 '24 10:02 antoniomerlin

Hi, just a query if i use this definition :-

apiVersion: jaegertracing.io/v1
kind: Jaeger
metadata:
  name: simplest
  namespace: observability
spec:
  query:
    metricsStorage:
      type: prometheus

I am unable to any value in q.jaeger.Spec.Query.MetricsStorage.Type in pkg/deployment/query.go line no. 131

antoniomerlin avatar Feb 22 '24 10:02 antoniomerlin

Hi, @iblancasa is the spec structure is fine:-

apiVersion: jaegertracing.io/v1
kind: Jaeger
metadata:
  name: simplest
  namespace: observability
spec:
  allInOne:
    metricsStorage:
      type: prometheus
      server-url: http://prometheus:9090 // This would be attach to container as PROMETHEUS_SERVER_URL env variable.

Yes.

I am unable to any value in q.jaeger.Spec.Query.MetricsStorage.Type in pkg/deployment/query.go line no. 131

You need to add it to the JaegerMetricsStorageSpec and it will be got from the JSON.

iblancasa avatar Feb 22 '24 11:02 iblancasa

Hi, @iblancasa is the spec structure is fine:-

apiVersion: jaegertracing.io/v1
kind: Jaeger
metadata:
  name: simplest
  namespace: observability
spec:
  allInOne:
    metricsStorage:
      type: prometheus
      server-url: http://prometheus:9090 // This would be attach to container as PROMETHEUS_SERVER_URL env variable.

Yes.

I am unable to any value in q.jaeger.Spec.Query.MetricsStorage.Type in pkg/deployment/query.go line no. 131

You need to add it to the JaegerMetricsStorageSpec and it will be got from the JSON. Hi, @iblancasa if its okay can you hide that prometheus URL in your comment accidentally copied.

antoniomerlin avatar Feb 22 '24 13:02 antoniomerlin