Skip to content

Commit

Permalink
Lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Boten authored and sky333999 committed Oct 11, 2023
1 parent ca00a4d commit e45656c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion exporter/jaegerthrifthttpexporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This exporter is being deprecated and will be removed in July 2023 as Jaeger sup

This exporter supports sending trace data to [Jaeger](https://www.jaegertracing.io) over Thrift HTTP.

*WARNING:* The [Jaeger gRPC Exporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/jaegerexporter) is the recommended one for exporting traces from an OpenTelemetry Collector to Jaeger. This Jaeger Thrift Exporter should only be used to export traces to a Jaeger Collector that is unable to expose the [gRPC API](https://www.jaegertracing.io/docs/1.27/apis/#protobuf-via-grpc-stable).
*WARNING:* The Jaeger gRPC Exporter is the recommended one for exporting traces from an OpenTelemetry Collector to Jaeger. This Jaeger Thrift Exporter should only be used to export traces to a Jaeger Collector that is unable to expose the [gRPC API](https://www.jaegertracing.io/docs/1.27/apis/#protobuf-via-grpc-stable).

## Configuration

Expand Down
12 changes: 2 additions & 10 deletions receiver/awscontainerinsightreceiver/internal/stores/podstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -608,11 +608,7 @@ func (p *PodStore) addPodContainerStatusMetrics(metric CIMetric, pod *corev1.Pod
reason := containerStatus.State.Waiting.Reason
if reason != "" {
if val, ok := ci.WaitingReasonLookup[reason]; ok {
if _, foundStatus := possibleStatuses[val]; foundStatus {
possibleStatuses[val]++
} else {
possibleStatuses[val] = 1
}
possibleStatuses[val]++
}
}
case containerStatus.State.Terminated != nil:
Expand All @@ -624,11 +620,7 @@ func (p *PodStore) addPodContainerStatusMetrics(metric CIMetric, pod *corev1.Pod

if containerStatus.LastTerminationState.Terminated != nil && containerStatus.LastTerminationState.Terminated.Reason != "" {
if strings.Contains(containerStatus.LastTerminationState.Terminated.Reason, "OOMKilled") {
if _, foundStatus := possibleStatuses[ci.StatusContainerTerminatedReasonOOMKilled]; foundStatus {
possibleStatuses[ci.StatusContainerTerminatedReasonOOMKilled]++
} else {
possibleStatuses[ci.StatusContainerTerminatedReasonOOMKilled] = 1
}
possibleStatuses[ci.StatusContainerTerminatedReasonOOMKilled]++
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ func TestPodStore_addStatus_enhanced_metrics(t *testing.T) {
metric = generateMetric(fields, tags)

podStore.addStatus(metric, pod)
//assert.Equal(t, "Waiting", metric.GetTag(ci.ContainerStatus))
// assert.Equal(t, "Waiting", metric.GetTag(ci.ContainerStatus))
assert.Equal(t, 2, metric.GetField(ci.MetricName(ci.TypePod, ci.StatusContainerWaiting)))
assert.Equal(t, 2, metric.GetField(ci.MetricName(ci.TypePod, ci.StatusContainerWaitingReasonCrashLoopBackOff)))
// sparse metrics
Expand Down

0 comments on commit e45656c

Please sign in to comment.