Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Node package folder location assumptions are broken #174

Closed
dnduffy opened this issue Nov 2, 2018 · 1 comment
Closed

Node package folder location assumptions are broken #174

dnduffy opened this issue Nov 2, 2018 · 1 comment
Assignees

Comments

@dnduffy
Copy link

dnduffy commented Nov 2, 2018

The code in package @opencensus/exporter-ocagent has hardcoded relative paths with the incorrect number of back references (..) when looking for @opencensus/core/package.json.
To get around this first problem you can run npm install --legacy-bundling (but you should not need to do this).

Next it will fail to find proto on ocagent.js:86 because the directory ../../../src/protos/ does not exist (nor does it exist with only two back references). This folder exists in the repository but is not packaged into the NPM package.
The workaround for this is to copy the folder from the repo into node_modules/@opencensus/exporter-ocagent/src/protos

@justindsmith justindsmith self-assigned this Feb 26, 2019
justindsmith added a commit that referenced this issue Feb 27, 2019
The `exporter-ocagent` had two critical issues which left the exporter unusable:

1. The required grpc proto files were not being referenced correctly (#174)
2. The `ConfigStream` behavior (where the ocagent can send configuration changes down to the client) was not connecting / receiving correctly from the ocagent, causing errors and spamming logs

The following changes have been applied to fix the above issues:

1. We now package the proto files for both OpenCensus and the google common proto set into the final `@opencensus/exporter-ocagent` package. The changes mostly reside in the `package.json` configuration.
2. We have removed all references to the `ConfigStream` behavior. This is a breaking change, but the ocagent exporter was not in a usable form previously, so I don't expect there to be any users directly impacted.

A few other changes have been included as well:

* The default ocagent port has been changed to `55678` to match the default OC Agent/Collector port.
* A slight reconnect delay has been added to avoid rapid reconnect attempts.
* Updated `grpc` dependency version to `1.18.0`.
* Readme / Docs update
* Changelog update
@justindsmith
Copy link
Contributor

@dnduffy Thanks for the submitted issue! Sorry it took a bit of time to get around to it. I've just pushed a fix that will get picked up in the next release.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants