Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename Log and Logf interface to AddEvent and AddEventf. #22

Merged
merged 3 commits into from
Jun 25, 2019

Conversation

rghetia
Copy link
Contributor

@rghetia rghetia commented Jun 24, 2019

  • also removed log package.

@@ -167,12 +166,24 @@ func (sp *span) Tracer() Tracer {
return sp.tracer
}

func (sp *span) Log(ctx context.Context, msg string, args ...core.KeyValue) {
log.With(sp).Log(ctx, msg, args...)
func (sp *span) AddEvent(ctx context.Context, msg string, attributes ...core.KeyValue) {
Copy link
Member

Choose a reason for hiding this comment

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

See how we solve this in Java. We have an interface called Event that can be implemented as "EventF" or as "EventString" so the main Span Interface does not have to provide all these variants.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

- Event can be created using Event specific interface.
Copy link
Contributor

@jmacd jmacd left a comment

Choose a reason for hiding this comment

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

Thank you. I will be working today on a PR to separate the API from the SDK more completely, as discussed in issue 20.

@rghetia
Copy link
Contributor Author

rghetia commented Jun 25, 2019

Thank you. I will be working today on a PR to separate the API from the SDK more completely, as discussed in issue 20.

I have started to separate this morning.

@rghetia
Copy link
Contributor Author

rghetia commented Jun 25, 2019

@bogdandrutu PTAL.

)

type (
event struct {
Copy link
Member

Choose a reason for hiding this comment

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

Add that var trick that enforces this struct to implement the Event interface?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@rghetia rghetia merged commit d6d9786 into open-telemetry:master Jun 25, 2019
@rghetia rghetia deleted the rename branch June 25, 2019 20:51
hstan referenced this pull request in hstan/opentelemetry-go Oct 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants