Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
flc1125 committed Dec 9, 2024
1 parent a77b9d0 commit c6da5fa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions instrumentation/net/http/otelhttp/internal/semconv/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func (s HTTPServer) RecordMetrics(ctx context.Context, md ServerMetricData) {
s.serverLatencyMeasure.Record(ctx, md.ElapsedTime, o)
}

if s.requestDurationHistogram != nil && s.requestBodySizeHistogram != nil && s.responseBodySizeHistogram != nil {
if s.duplicate && s.requestDurationHistogram != nil && s.requestBodySizeHistogram != nil && s.responseBodySizeHistogram != nil {
attributes := newHTTPServer{}.MetricAttributes(md.ServerName, md.Req, md.StatusCode, md.AdditionalAttributes)
o := metric.WithAttributeSet(attribute.NewSet(attributes...))
s.requestDurationHistogram.Record(ctx, md.ElapsedTime, o)
Expand Down Expand Up @@ -217,7 +217,7 @@ func (c HTTPClient) MetricOptions(ma MetricAttributes) MetricOpts {

func (s HTTPClient) RecordMetrics(ctx context.Context, md MetricData, opts MetricOpts) {
if s.requestBytesCounter == nil || s.latencyMeasure == nil {
// This will happen if an HTTPClient{} is used insted of NewHTTPClient().
// This will happen if an HTTPClient{} is used instead of NewHTTPClient().
return
}

Expand All @@ -229,7 +229,7 @@ func (s HTTPClient) RecordMetrics(ctx context.Context, md MetricData, opts Metri

func (s HTTPClient) RecordResponseSize(ctx context.Context, responseData int64, opts metric.AddOption) {
if s.responseBytesCounter == nil {
// This will happen if an HTTPClient{} is used insted of NewHTTPClient().
// This will happen if an HTTPClient{} is used instead of NewHTTPClient().
return
}

Expand Down

0 comments on commit c6da5fa

Please sign in to comment.