Skip to content

tags in datapoints were missing  #16

@candysmurf

Description

@candysmurf

If creating metric definition with tags then write data points with tags, tags shown in the GET query. When not creating metric definition, only write data points, tags defined inside data points were all missing in the GET query returned results.

For example

tags := make(map[string]string)
tags["env"] = "hawkular"

dp := metrics.Datapoint{Value: 1.45, Timestamp: time.Now(), Tags: tags}

header := metrics.MetricHeader{
   ID:   "doc.gauge.1",
   Data: []metrics.Datapoint{dp},
   Type: metrics.Gauge,
}
err = c.Write([]metrics.MetricHeader{header})

Do I always have to write both MetricDefinition and MetricHeader? Can tags in MetricDefinition different than tags in the data points?

My another question is if this client is still usable? thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions