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

Added OTLP/HTTP JSON Exporter #210

Merged
merged 13 commits into from
Nov 10, 2020
Merged

Added OTLP/HTTP JSON Exporter #210

merged 13 commits into from
Nov 10, 2020

Conversation

riticksingh
Copy link
Contributor

Signed-off-by:Ritick Gautam[email protected]

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Nov 4, 2020

CLA Check
The committers are authorized under a signed CLA.

@codecov
Copy link

codecov bot commented Nov 4, 2020

Codecov Report

Merging #210 (16e6604) into master (16c3f97) will increase coverage by 0.57%.
The diff coverage is 98.59%.

Impacted file tree graph

@@             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     
Impacted Files Coverage Δ Complexity Δ
contrib/Otlp/Exporter.php 97.67% <97.67%> (ø) 21.00 <21.00> (?)
contrib/Otlp/SpanConverter.php 100.00% <100.00%> (ø) 11.00 <11.00> (?)

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 16c3f97...16e6604. Read the comment docs.

@prondubuisi
Copy link
Contributor

prondubuisi commented Nov 4, 2020

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
EASYCLA

@riticksingh
Copy link
Contributor Author

riticksingh commented Nov 4, 2020

Screenshot from 2020-11-04 16-23-33
yes I got the mail from easyCLA on the same email id which I use for github but still it is showing missing ID commit

@bobstrecansky
Copy link
Collaborator

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 [email protected] rather than [email protected]. I think this is the cause of the CLA check failing. Output below:

$ git log -n 3

commit 740351c8a4aef48bac6eb27251f393198e998aab (HEAD -> ritickmaster, ritick/master)
Author: riticksingh <[email protected]>
Date:   Wed Nov 4 17:11:52 2020 +0530

    Updated OTLPExporterTest

commit e00896e491565f6148871e8aa160036c221dfcef
Author: riticksingh <[email protected]>
Date:   Wed Nov 4 16:45:27 2020 +0530

    Added test case for OTLPExporter

    Signed-off-by:Ritick Gautam

commit be556ad13fc4d9e3191c7cce7b5bdebd7bc7fd61
Author: riticksingh <[email protected]>
Date:   Wed Nov 4 14:40:45 2020 +0530

    Added OTLP/HTTP JSON Exporter

    Signed-off-by:Ritick Gautam<[email protected]>

@bobstrecansky
Copy link
Collaborator

You can set your author name and email using the following tutorial:
https://www.git-tower.com/learn/git/faq/change-author-name-email/

$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;
Copy link
Contributor

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.

https://3v4l.org/lmWjD

Copy link
Collaborator

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 👍

Copy link
Contributor

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. :)

Copy link
Collaborator

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!

Copy link
Contributor

Choose a reason for hiding this comment

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

NP 👍


declare(strict_types=1);

namespace OpenTelemetry\Contrib\otlp;
Copy link

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 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

lowercase

Copy link
Collaborator

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.

Copy link

@adhocore adhocore Nov 6, 2020

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.

Copy link
Collaborator

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;

Copy link
Contributor Author

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 👍

Copy link
Collaborator

@bobstrecansky bobstrecansky left a 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.


declare(strict_types=1);

namespace OpenTelemetry\Contrib\otlp;
Copy link
Collaborator

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.

Copy link
Contributor

@morrisonlevi morrisonlevi left a 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).

@bobstrecansky
Copy link
Collaborator

Good catch @morrisonlevi - I ran php-cs-fixer on this using make style and noticed a couple fixes.

@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.

@bobstrecansky bobstrecansky merged commit 094333d into open-telemetry:master Nov 10, 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.

6 participants