...

Source file src/go.opencensus.io/metric/metricdata/exemplar.go

Documentation: go.opencensus.io/metric/metricdata

     1  // Copyright 2018, OpenCensus Authors
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  package metricdata
    16  
    17  import (
    18  	"time"
    19  )
    20  
    21  // Exemplars keys.
    22  const (
    23  	AttachmentKeySpanContext = "SpanContext"
    24  )
    25  
    26  // Exemplar is an example data point associated with each bucket of a
    27  // distribution type aggregation.
    28  //
    29  // Their purpose is to provide an example of the kind of thing
    30  // (request, RPC, trace span, etc.) that resulted in that measurement.
    31  type Exemplar struct {
    32  	Value       float64     // the value that was recorded
    33  	Timestamp   time.Time   // the time the value was recorded
    34  	Attachments Attachments // attachments (if any)
    35  }
    36  
    37  // Attachments is a map of extra values associated with a recorded data point.
    38  type Attachments map[string]interface{}
    39  

View as plain text