Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

improve documentation for log.Object() #219

Merged
merged 1 commit into from Aug 29, 2019
Merged

improve documentation for log.Object() #219

merged 1 commit into from Aug 29, 2019

Conversation

lujinda
Copy link
Contributor

@lujinda lujinda commented Aug 9, 2019

improve documentation for log.Object() to emphasize the requirement to pass immutable arguments
#218

@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (master@135aa78). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #219   +/-   ##
=========================================
  Coverage          ?   59.32%           
=========================================
  Files             ?       14           
  Lines             ?      831           
  Branches          ?        0           
=========================================
  Hits              ?      493           
  Misses            ?      298           
  Partials          ?       40
Impacted Files Coverage Δ
log/field.go 34.4% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 135aa78...c31a8d3. Read the comment docs.

@@ -132,6 +132,9 @@ func Error(err error) Field {
}

// Object adds an object-valued key:value pair to a Span.LogFields() record
// Please pass in an immutable object, otherwise there may be concurrency issues.
// Such as passing in the map, log.Object may result in "fatal error: concurrent map iteration and map write".
// Because span is sent asynchronously, it is possible that this map will also be modified.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI I view this as a bug, but we're trying to retire these libraries in favor of OpenTelemetry, where this will get addressed.

@jmacd
Copy link
Contributor

jmacd commented Aug 29, 2019

Similar issue filed in OpenTelemetry: open-telemetry/opentelemetry-go#105

@jmacd jmacd merged commit 20bb258 into opentracing:master Aug 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants