-
Notifications
You must be signed in to change notification settings - Fork 1k
grpc for node and support for new proto format for node and browser #901
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
ca51581
feat: send data using grpc for collector exporter
obecny 58abdb2
chore: proto submodule
obecny 34e087e
chore: using new proto format for browser
obecny 0a18683
Merge branch 'master' into ec_proto
obecny 3e2e169
chore: fixing submodule
obecny 939c5f4
chore: adding protos submodule
obecny 0c9273d
chore: cleanup
obecny 3cd6d74
chore: cleanup
obecny 9abf4c1
chore: adding sync for submodule
obecny edfdc7f
Merge branch 'master' into ec_proto
obecny 6ac42e4
chore: merge branch 'master' into ec_proto
obecny 9bc6a03
chore: testing submodule
obecny bbb0255
chore: updating submodule for opentelemetry-proto
obecny c1c1a2d
chore: updates and fixes after testing with collector, refactored hel…
obecny 9f11f55
Merge branch 'master' into ec_proto
obecny 1e625d6
chore: merge branch 'master' into ec_proto
obecny bb2ba8b
chore: reviews
obecny fd9be01
chore: removing TruncatableString
obecny 4fa67cc
chore: merge branch 'master' into ec_proto
obecny e31dc0b
chore: reviews
obecny File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
chore: updates and fixes after testing with collector, refactored hel…
…per for tests
- Loading branch information
commit c1c1a2d40e611ebf83ea32158a9fdb216fd07553
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
packages/opentelemetry-exporter-collector/src/platform/node/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| ### Important! | ||
| **Submodule is always pointing to certain revision number. So updating the master of the submodule repo will not have impact on your code. | ||
| Knowing this if you want to change the submodule to point to a different version (when for example proto has changed) here is how to do it:** | ||
|
|
||
| ### Updating submodule to point to certain revision number | ||
|
|
||
| 1. Make sure you are in the same folder as this instruction | ||
|
|
||
| 2. Update your submodules by running this command | ||
|
|
||
| ```shell script | ||
| git submodule sync --recursive | ||
| git submodule update --init --recursive | ||
| ``` | ||
|
|
||
| 3. Find the SHA which you want to update to and copy it (the long one) | ||
| the latest sha when this guide was written is `e6c3c4a74d57f870a0d781bada02cb2b2c497d14` | ||
|
|
||
| 4. Enter a submodule directory from this directory | ||
|
|
||
| ```shell script | ||
| cd protos | ||
| ``` | ||
|
|
||
| 5. Updates files in the submodule tree to given commit: | ||
|
|
||
| ```shell script | ||
| git checkout -q <sha> | ||
| ``` | ||
|
|
||
| 6. Return to the main directory: | ||
|
|
||
| ```shell script | ||
| cd ../ | ||
| ``` | ||
|
|
||
| 7. Please run `git status` you should see something like `Head detached at`. This is correct, go to next step | ||
|
|
||
| 8. Now thing which is very important. You have to commit this to apply these changes | ||
|
|
||
| ```shell script | ||
| git commit -am "chore: updating submodule for opentelemetry-proto" | ||
| ``` | ||
|
|
||
| 9. If you look now at git log you will notice that the folder `protos` has been changed and it will show what was the previous sha and what is current one |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
packages/opentelemetry-exporter-collector/src/platform/node/util.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| /*! | ||
| * Copyright 2020, OpenTelemetry Authors | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * https://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| /** | ||
| * It will remove http or https from the link as grpc requires link without | ||
| * protocol | ||
| * @param url | ||
| */ | ||
| export function fixGRPCUrl(url: string): string { | ||
obecny marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| let fixedUrl = url; | ||
| const removeArr = ['http://', 'https://']; | ||
| removeArr.forEach(el => { | ||
| if (fixedUrl.indexOf(el) === 0) { | ||
| fixedUrl = fixedUrl.replace(el, ''); | ||
| } | ||
| }); | ||
| return fixedUrl; | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.