Skip to content

Commit

Permalink
update all metrics with prefix
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
  • Loading branch information
codeboten committed Jun 10, 2024
1 parent 6020a82 commit 686bf0a
Show file tree
Hide file tree
Showing 19 changed files with 246 additions and 246 deletions.
22 changes: 11 additions & 11 deletions exporter/exporterhelper/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,87 +6,87 @@

The following telemetry is emitted by this component.

### exporter_enqueue_failed_log_records
### otelcol_exporter_enqueue_failed_log_records

Number of log records failed to be added to the sending queue.

| Unit | Metric Type | Value Type | Monotonic |
| ---- | ----------- | ---------- | --------- |
| 1 | Sum | Int | true |

### exporter_enqueue_failed_metric_points
### otelcol_exporter_enqueue_failed_metric_points

Number of metric points failed to be added to the sending queue.

| Unit | Metric Type | Value Type | Monotonic |
| ---- | ----------- | ---------- | --------- |
| 1 | Sum | Int | true |

### exporter_enqueue_failed_spans
### otelcol_exporter_enqueue_failed_spans

Number of spans failed to be added to the sending queue.

| Unit | Metric Type | Value Type | Monotonic |
| ---- | ----------- | ---------- | --------- |
| 1 | Sum | Int | true |

### exporter_queue_capacity
### otelcol_exporter_queue_capacity

Fixed capacity of the retry queue (in batches)

| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| 1 | Gauge | Int |

### exporter_queue_size
### otelcol_exporter_queue_size

Current size of the retry queue (in batches)

| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| 1 | Gauge | Int |

### exporter_send_failed_log_records
### otelcol_exporter_send_failed_log_records

Number of log records in failed attempts to send to destination.

| Unit | Metric Type | Value Type | Monotonic |
| ---- | ----------- | ---------- | --------- |
| 1 | Sum | Int | true |

### exporter_send_failed_metric_points
### otelcol_exporter_send_failed_metric_points

Number of metric points in failed attempts to send to destination.

| Unit | Metric Type | Value Type | Monotonic |
| ---- | ----------- | ---------- | --------- |
| 1 | Sum | Int | true |

### exporter_send_failed_spans
### otelcol_exporter_send_failed_spans

Number of spans in failed attempts to send to destination.

| Unit | Metric Type | Value Type | Monotonic |
| ---- | ----------- | ---------- | --------- |
| 1 | Sum | Int | true |

### exporter_sent_log_records
### otelcol_exporter_sent_log_records

Number of log record successfully sent to destination.

| Unit | Metric Type | Value Type | Monotonic |
| ---- | ----------- | ---------- | --------- |
| 1 | Sum | Int | true |

### exporter_sent_metric_points
### otelcol_exporter_sent_metric_points

Number of metric points successfully sent to destination.

| Unit | Metric Type | Value Type | Monotonic |
| ---- | ----------- | ---------- | --------- |
| 1 | Sum | Int | true |

### exporter_sent_spans
### otelcol_exporter_sent_spans

Number of spans successfully sent to destination.

Expand Down
80 changes: 40 additions & 40 deletions exporter/exporterhelper/internal/metadata/generated_telemetry.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions exporter/exporterhelper/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,79 +9,79 @@ status:

telemetry:
metrics:
exporter_sent_spans:
otelcol_exporter_sent_spans:
enabled: true
description: Number of spans successfully sent to destination.
unit: 1
sum:
value_type: int
monotonic: true

exporter_send_failed_spans:
otelcol_exporter_send_failed_spans:
enabled: true
description: Number of spans in failed attempts to send to destination.
unit: 1
sum:
value_type: int
monotonic: true

exporter_enqueue_failed_spans:
otelcol_exporter_enqueue_failed_spans:
enabled: true
description: Number of spans failed to be added to the sending queue.
unit: 1
sum:
value_type: int
monotonic: true

exporter_sent_metric_points:
otelcol_exporter_sent_metric_points:
enabled: true
description: Number of metric points successfully sent to destination.
unit: 1
sum:
value_type: int
monotonic: true

exporter_send_failed_metric_points:
otelcol_exporter_send_failed_metric_points:
enabled: true
description: Number of metric points in failed attempts to send to destination.
unit: 1
sum:
value_type: int
monotonic: true

exporter_enqueue_failed_metric_points:
otelcol_exporter_enqueue_failed_metric_points:
enabled: true
description: Number of metric points failed to be added to the sending queue.
unit: 1
sum:
value_type: int
monotonic: true

exporter_sent_log_records:
otelcol_exporter_sent_log_records:
enabled: true
description: Number of log record successfully sent to destination.
unit: 1
sum:
value_type: int
monotonic: true

exporter_send_failed_log_records:
otelcol_exporter_send_failed_log_records:
enabled: true
description: Number of log records in failed attempts to send to destination.
unit: 1
sum:
value_type: int
monotonic: true

exporter_enqueue_failed_log_records:
otelcol_exporter_enqueue_failed_log_records:
enabled: true
description: Number of log records failed to be added to the sending queue.
unit: 1
sum:
value_type: int
monotonic: true

exporter_queue_size:
otelcol_exporter_queue_size:
enabled: true
description: Current size of the retry queue (in batches)
unit: 1
Expand All @@ -90,7 +90,7 @@ telemetry:
value_type: int
async: true

exporter_queue_capacity:
otelcol_exporter_queue_capacity:
enabled: true
description: Fixed capacity of the retry queue (in batches)
unit: 1
Expand Down
18 changes: 9 additions & 9 deletions exporter/exporterhelper/obsexporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,14 @@ func (or *ObsReport) recordMetrics(ctx context.Context, dataType component.DataT
var sentMeasure, failedMeasure metric.Int64Counter
switch dataType {
case component.DataTypeTraces:
sentMeasure = or.telemetryBuilder.ExporterSentSpans
failedMeasure = or.telemetryBuilder.ExporterSendFailedSpans
sentMeasure = or.telemetryBuilder.OtelcolExporterSentSpans
failedMeasure = or.telemetryBuilder.OtelcolExporterSendFailedSpans
case component.DataTypeMetrics:
sentMeasure = or.telemetryBuilder.ExporterSentMetricPoints
failedMeasure = or.telemetryBuilder.ExporterSendFailedMetricPoints
sentMeasure = or.telemetryBuilder.OtelcolExporterSentMetricPoints
failedMeasure = or.telemetryBuilder.OtelcolExporterSendFailedMetricPoints
case component.DataTypeLogs:
sentMeasure = or.telemetryBuilder.ExporterSentLogRecords
failedMeasure = or.telemetryBuilder.ExporterSendFailedLogRecords
sentMeasure = or.telemetryBuilder.OtelcolExporterSentLogRecords
failedMeasure = or.telemetryBuilder.OtelcolExporterSendFailedLogRecords
}

sentMeasure.Add(ctx, sent, metric.WithAttributes(or.otelAttrs...))
Expand Down Expand Up @@ -157,11 +157,11 @@ func (or *ObsReport) recordEnqueueFailure(ctx context.Context, dataType componen
var enqueueFailedMeasure metric.Int64Counter
switch dataType {
case component.DataTypeTraces:
enqueueFailedMeasure = or.telemetryBuilder.ExporterEnqueueFailedSpans
enqueueFailedMeasure = or.telemetryBuilder.OtelcolExporterEnqueueFailedSpans
case component.DataTypeMetrics:
enqueueFailedMeasure = or.telemetryBuilder.ExporterEnqueueFailedMetricPoints
enqueueFailedMeasure = or.telemetryBuilder.OtelcolExporterEnqueueFailedMetricPoints
case component.DataTypeLogs:
enqueueFailedMeasure = or.telemetryBuilder.ExporterEnqueueFailedLogRecords
enqueueFailedMeasure = or.telemetryBuilder.OtelcolExporterEnqueueFailedLogRecords
}

enqueueFailedMeasure.Add(ctx, failed, metric.WithAttributes(or.otelAttrs...))
Expand Down
Loading

0 comments on commit 686bf0a

Please sign in to comment.