Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

context vs extras arguments #2

Open
Assignees
@colinscape

Description

Heya @erickhun !

Thanks for putting this together! I had a few thoughts on this that I wasn't sure how best to share, so thought I'd try out a GH issue! 😀

First up - all the 'logging' methods that are exposed have a context as well as a extras parameter. None of the examples show use of the extras parameter though, which seems to suggest that they are maybe from more 'internal' use. Is that right?

If it is right, I think we should remove the extras parameter from the exposed methods, to keep things simple.

Also, I see that the Datadog trace and span ids are being inserted into the context[dd] parameters. Since this is the parameter passed by the caller, this feels a bit odd, since there is the (small) potential for these to clash. It would make more sense from my side that the Datadog parameters get added into the extras parameter. What do you think?

I don't know how the context and extras are treated differently by Monolog, so this might not be the most appropriate thing to do. However, I do think we should have a clear way for this to distinguish between the caller's parameters and the more 'built-in' parameters.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      AltStyle によって変換されたページ (->オリジナル) /