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

[Bug] Can't create GrafanaDatasource for Tempo with traceToLogs #674

Closed
slenky opened this issue Feb 1, 2022 · 2 comments · Fixed by #675
Closed

[Bug] Can't create GrafanaDatasource for Tempo with traceToLogs #674

slenky opened this issue Feb 1, 2022 · 2 comments · Fixed by #675
Labels
feature-request requests a new feature that currently isn't implemented in the project good first issue Good for newcomers help wanted Extra attention is needed triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@slenky
Copy link
Contributor

slenky commented Feb 1, 2022

Describe the bug
I am trying to create a Tempo datasource using that example

apiVersion: integreatly.org/v1alpha1
kind: GrafanaDataSource
metadata:
  name: tempo
spec:
  name: tempo.yaml
  datasources:
    - name: Tempo
      uid: tempo-datasource
      type: tempo
      access: proxy
      url: http://tempo:3100
      isDefault: false
      version: 1
      editable: false
      jsonData:
        httpMethod: "GET"
        nodeGraph:
          enabled: true
        search:
          hide: false
        serviceMap:
          datasourceUid: "thanos-datasource"
        tracesToLogs:
          datasourceUid: "loki-datasource"
          filterBySpanID: false
          filterByTraceID: false
          lokiSearch: true
          spanEndTimeShift: "1h"
          spanStartTimeShift: "1h"
          tags:
          - "job"
          - "instance"
          - "pod"
          - "namespace"

However, I recieve an error:

unable to build kubernetes objects from release manifest: error validating "": error validating data: [ValidationError(GrafanaDataSource.spec.datasources[0].jsonData): unknown field "nodeGraph" in org.integreatly.v1alpha1.GrafanaDataSource.spec.datasources.jsonData, ValidationError(GrafanaDataSource.spec.datasources[0].jsonData): unknown field "search" in org.integreatly.v1alpha1.GrafanaDataSource.spec.datasources.jsonData, ValidationError(GrafanaDataSource.spec.datasources[0].jsonData): unknown field "serviceMap" in org.integreatly.v1alpha1.GrafanaDataSource.spec.datasources.jsonData, ValidationError(GrafanaDataSource.spec.datasources[0].jsonData.tracesToLogs): unknown field "filterBySpanID" in org.integreatly.v1alpha1.GrafanaDataSource.spec.datasources.jsonData.tracesToLogs, ValidationError(GrafanaDataSource.spec.datasources[0].jsonData.tracesToLogs): unknown field "filterByTraceID" in org.integreatly.v1alpha1.GrafanaDataSource.spec.datasources.jsonData.tracesToLogs, ValidationError(GrafanaDataSource.spec.datasources[0].jsonData.tracesToLogs): unknown field "lokiSearch" in org.integreatly.v1alpha1.GrafanaDataSource.spec.datasources.jsonData.tracesToLogs]

Some fields in jsonData are not up-to-date (at least according to Grafana docs they should be present):

.jsonData.nodeGraph
.jsonData.search
.jsonData.serviceMap
.jsonData.traceToLogs.filterBySpanID
.jsonData.traceToLogs.filterByTraceID
.jsonData.traceToLogs.lokiSearch

Version
v.4.1.1

To Reproduce
Steps to reproduce the behavior:

  1. Install operator and try to apply manifest above.

Expected behavior
Tempo datasource with links to prometheus/loki created.

Suspect component/Location where the bug might be occuring
during datasource creation

Screenshots
If applicable, add screenshots to help explain your problem.

Runtime (please complete the following information):

  • OS: MacOS
  • Grafana Operator Version v4.1.1
  • Environment: Kubernetes 1.21
  • Deployment type: deployed operator using Helm
@slenky slenky added bug Something isn't working needs triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Feb 1, 2022
@NissesSenap NissesSenap added feature-request requests a new feature that currently isn't implemented in the project help wanted Extra attention is needed triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs triage Indicates an issue or PR lacks a `triage/foo` label and requires one. bug Something isn't working labels Feb 1, 2022
@NissesSenap
Copy link
Collaborator

Thanks for bringing this to our attention @slenky.
We haven't implemented all the config values that exist in grafana since they get updated so regularly.
We would love to have this feature in the operator.

Is this something that you would be willing to try to implement on your own?
You can for example look at: #609

@NissesSenap NissesSenap added the good first issue Good for newcomers label Feb 1, 2022
slenky added a commit to slenky/grafana-operator that referenced this issue Feb 2, 2022
Signed-off-by: Bohdan Astapov <astapovb@ukr.net>
@slenky
Copy link
Contributor Author

slenky commented Feb 2, 2022

@NissesSenap thanks for a good example and operator as well :) I've opened a PR to fix that.

NissesSenap pushed a commit that referenced this issue Feb 5, 2022
* add new traceToLogs jsonData fields, fixes #674

Signed-off-by: Bohdan Astapov <astapovb@ukr.net>
Co-authored-by: Edvin Norling <edvin.norling@xenit.se>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request requests a new feature that currently isn't implemented in the project good first issue Good for newcomers help wanted Extra attention is needed triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants