Documentation ¶
Overview ¶
Package config is a generated protocol buffer package.
The `signalfx` adapter collects Istio metrics and trace spans and sends them to [SignalFx](https://signalfx.com).
This adapter supports the [metric template](https://istio.io/docs/reference/config/policy-and-telemetry/templates/metric/) and [tracespan template](https://istio.io/docs/reference/config/policy-and-telemetry/templates/tracespan/).
If sending trace spans, this adapter can make use of certain conventions in the tracespan format that is configured to send to this adapter. Here is an example tracespan spec that will work well:
```yaml apiVersion: config.istio.io/v1alpha2 kind: tracespan metadata:
name: signalfx
spec:
traceId: request.headers["x-b3-traceid"] | "" spanId: request.headers["x-b3-spanid"] | "" parentSpanId: request.headers["x-b3-parentspanid"] | "" # If the path contains query parameters, they will be split off and put into # tags such that the span name sent to SignalFx will consist only of the path # itself. spanName: request.path | "/" startTime: request.time endTime: response.time # If this is >=500, the span will get an 'error' tag httpStatusCode: response.code | 0 clientSpan: context.reporter.kind == "outbound" # Span tags below that do not have comments are useful but optional and will # be passed to SignalFx unmodified. The tags that have comments are interpreted # in a special manner, but are still optional. spanTags: # This is used to determine whether the span pertains to the client or # server side of the request. context.reporter.local: context.reporter.local # This gets put into the remoteEndpoint.ipv4 field destination.ip: destination.ip | ip("0.0.0.0") # This gets flattened out to individual tags of the form # 'destination.labels.<key>: <value>'. destination.labels: destination.labels # This gets put into the remoteEndpoint.name field destination.name: destination.name | "unknown" destination.namespace: destination.namespace | "unknown" request.host: request.host | "" request.method: request.method | "" request.path: request.path | "" request.size: request.size | 0 request.useragent: request.useragent | "" response.size: response.size | 0 # This gets put into the localEndpoint.name field source.name: source.name | "unknown" # This gets put into the localEndpoint.ipv4 field source.ip: source.ip | ip("0.0.0.0") source.namespace: source.namespace | "unknown" # This gets flattened out to individual tags of the form # 'source.labels.<key>: <value>'. source.labels: source.labels source.version: source.labels["version"] | "unknown" ```
It is generated from these files:
mixer/adapter/signalfx/config/config.proto
It has these top-level messages:
Params
Index ¶
- Variables
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (m *Params) Marshal() (dAtA []byte, err error)
- func (m *Params) MarshalTo(dAtA []byte) (int, error)
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (this *Params) String() string
- func (m *Params) Unmarshal(dAtA []byte) error
- type Params_MetricConfig
- func (*Params_MetricConfig) Descriptor() ([]byte, []int)
- func (m *Params_MetricConfig) Marshal() (dAtA []byte, err error)
- func (m *Params_MetricConfig) MarshalTo(dAtA []byte) (int, error)
- func (*Params_MetricConfig) ProtoMessage()
- func (m *Params_MetricConfig) Reset()
- func (m *Params_MetricConfig) Size() (n int)
- func (this *Params_MetricConfig) String() string
- func (m *Params_MetricConfig) Unmarshal(dAtA []byte) error
- type Params_MetricConfig_Type
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthConfig = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowConfig = fmt.Errorf("proto: integer overflow") )
var Params_MetricConfig_Type_name = map[int32]string{
0: "NONE",
1: "COUNTER",
2: "HISTOGRAM",
}
var Params_MetricConfig_Type_value = map[string]int32{
"NONE": 0,
"COUNTER": 1,
"HISTOGRAM": 2,
}
Functions ¶
This section is empty.
Types ¶
type Params ¶
type Params struct { // Required. The set of metrics to send to SignalFx. If an Istio metric is // configured to be sent to this adapter, it must have a corresponding // description here. Metrics []*Params_MetricConfig `protobuf:"bytes,1,rep,name=metrics" json:"metrics,omitempty"` // Optional. The URL of the SignalFx ingest server to use. Will default to // the global ingest server if not specified. IngestUrl string `protobuf:"bytes,2,opt,name=ingest_url,json=ingestUrl,proto3" json:"ingest_url,omitempty"` // Required. The access token for the SignalFx organization that should // receive the metrics. AccessToken string `protobuf:"bytes,3,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` // Optional. Specifies how frequently to send metrics to SignalFx. Metrics // reported to this adapter are collected and reported as a timeseries. // This will be rounded to the nearest second and rounded values less than // one second are not valid. Defaults to 10 seconds if not specified. DatapointInterval time.Duration `protobuf:"bytes,4,opt,name=datapoint_interval,json=datapointInterval,stdduration" json:"datapoint_interval"` // Optional. If set to false, metrics won't be sent (but trace spans will // be sent, unless otherwise disabled). EnableMetrics bool `protobuf:"varint,5,opt,name=enable_metrics,json=enableMetrics,proto3" json:"enable_metrics,omitempty"` // Optional. If set to false, trace spans won't be sent (but metrics will // be sent, unless otherwise disabled). EnableTracing bool `protobuf:"varint,6,opt,name=enable_tracing,json=enableTracing,proto3" json:"enable_tracing,omitempty"` // Optional. The number of trace spans that the adapter will buffer before // dropping them. This defaults to 1000 spans but can be configured higher // if needed. An error message will be logged if spans are dropped. TracingBufferSize uint32 `protobuf:"varint,7,opt,name=tracing_buffer_size,json=tracingBufferSize,proto3" json:"tracing_buffer_size,omitempty"` // Optional. The uniform probability ([0.0, 1.0]) that a given span gets // sampled if its parent was not already sampled. Child spans will always // be sampled if their parent is. If not provided, defaults to sending all // spans. TracingSampleProbability float64 `` /* 137-byte string literal not displayed */ }
Configuration format for the `signalfx` adapter.
func (*Params) Descriptor ¶
func (*Params) ProtoMessage ¶
func (*Params) ProtoMessage()
type Params_MetricConfig ¶
type Params_MetricConfig struct { // Required. The name of the metric as it is sent to the adapter. In // Kubernetes this is of the form "<name>.metric.<namespace>" where // "<name>" is the name field of the metric resource, and "<namespace>" // is the namespace of the metric resource. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The metric type of the metric Type Params_MetricConfig_Type `protobuf:"varint,4,opt,name=type,proto3,enum=adapter.signalfx.config.Params_MetricConfig_Type" json:"type,omitempty"` }
Describes what metrics should be sent to SignalFx and in what form.
func (*Params_MetricConfig) Descriptor ¶
func (*Params_MetricConfig) Descriptor() ([]byte, []int)
func (*Params_MetricConfig) Marshal ¶
func (m *Params_MetricConfig) Marshal() (dAtA []byte, err error)
func (*Params_MetricConfig) MarshalTo ¶
func (m *Params_MetricConfig) MarshalTo(dAtA []byte) (int, error)
func (*Params_MetricConfig) ProtoMessage ¶
func (*Params_MetricConfig) ProtoMessage()
func (*Params_MetricConfig) Reset ¶
func (m *Params_MetricConfig) Reset()
func (*Params_MetricConfig) Size ¶
func (m *Params_MetricConfig) Size() (n int)
func (*Params_MetricConfig) String ¶
func (this *Params_MetricConfig) String() string
func (*Params_MetricConfig) Unmarshal ¶
func (m *Params_MetricConfig) Unmarshal(dAtA []byte) error
type Params_MetricConfig_Type ¶
type Params_MetricConfig_Type int32
Describes what kind of metric this is.
const ( // None is the default and is invalid NONE Params_MetricConfig_Type = 0 // Values with the same set of dimensions will be added together // as a continuously incrementing value. COUNTER Params_MetricConfig_Type = 1 // A histogram distribution. This will result in several metrics // emitted for each unique set of dimensions. HISTOGRAM Params_MetricConfig_Type = 2 )
func (Params_MetricConfig_Type) EnumDescriptor ¶
func (Params_MetricConfig_Type) EnumDescriptor() ([]byte, []int)
func (Params_MetricConfig_Type) String ¶
func (x Params_MetricConfig_Type) String() string