-
Notifications
You must be signed in to change notification settings - Fork 191
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
Added OTLP/HTTP JSON Exporter #210
Conversation
|
Codecov Report
@@ Coverage Diff @@
## master #210 +/- ##
============================================
+ Coverage 91.82% 92.40% +0.57%
- Complexity 321 353 +32
============================================
Files 36 38 +2
Lines 758 829 +71
============================================
+ Hits 696 766 +70
- Misses 62 63 +1
Continue to review full report at Codecov.
|
Hello @riticksingh did you get an email from EasyCLA confirming your signature signed? If so do confirm that you are using the same email for your Github push. This is what my email looked like |
Looking at your individual commits, it looks like you've used a different email address in your local author's git config. I checked out your branch locally, and I see the author on your last 3 commits being listed as
|
You can set your author name and email using the following tutorial: |
contrib/otlp/Exporter.php
Outdated
$this->certificateFile = getenv("OTEL_EXPORTER_OTLP_CERTIFICATE") ?: "none"; | ||
$this->headers[] = getenv("OTEL_EXPORTER_OTLP_HEADERS") ?: "none"; | ||
$this->compression = getenv("OTEL_EXPORTER_OTLP_COMPRESSION") ?: "none"; | ||
$this->timeout = getenv("OTEL_EXPORTER_OTLP_TIMEOUT") ?: 10; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?:
is unsafe here since it will fail with 0
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're free to change this - it's your PR 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eh, it might be a case of mistaken identity here. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, was referring to @riticksingh - I could see how that would be confusing!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NP 👍
contrib/otlp/Exporter.php
Outdated
|
||
declare(strict_types=1); | ||
|
||
namespace OpenTelemetry\Contrib\otlp; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it typo or really lowercase otlp
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lowercase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other languages also use lower case, but I'm wondering if it's more PHP like to use capitals here. I don't have strong opinions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imo StuldyCase is preferred more than camelCase or lowercase in class name and in namespace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
StudlyCase would be fine with me too:
namespace OpenTelemetry\Contrib\Otlp;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated the namespace have a look and thanks for this 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one comment on naming but otherwise this looks good to me! Will let other contributors chime in.
contrib/otlp/Exporter.php
Outdated
|
||
declare(strict_types=1); | ||
|
||
namespace OpenTelemetry\Contrib\otlp; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other languages also use lower case, but I'm wondering if it's more PHP like to use capitals here. I don't have strong opinions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the formatter running checks on this? The formatting for the constructor looked a bit weird, and there aren't trailing newlines in some of the files (which I thought was part of the checks, but maybe not).
Good catch @morrisonlevi - I ran php-cs-fixer on this using @riticksingh - can you perform that action and push it to this branch? I'll open a separate issue to determine why this isn't being applied during CI. |
Signed-off-by:Ritick Gautam[email protected]