-
Notifications
You must be signed in to change notification settings - Fork 21
Remove @opencensus/core dep for ocagent exporter #23
Conversation
@@ -29,7 +28,7 @@ const RECENT_EPOCH_MS = 1500000000000; // July 13, 2017. | |||
* Converts a RootSpan type from @opencensus/core to the Span JSON structure |
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.
Should we change this comment from @opencensus/core
-> @opencensus/web-core
?
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.
Good catch, done.
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.
LGTM, just curious to know the motivation behind making library buildable with Bazel and the Closure compiler.
The Closure compiler has some more advanced optimization/minification techniques that should result in smaller bundle sizes for use in See Angular BuildTools Convergence for more on Bazel for TypeScript. |
The reason I wanted to do this sooner rather than later is that the Closure compiler also restricts certain more dynamic uses of JS due to how it renames properties, so wanted to set up some build rules in CI to make sure future changes would be Closure compiler safe. |
…fig.yaml Use the config.yaml file to configure the OpenCensus interceptor listener's address, instead of using commandline flags. This is because all the other configurations are performed using the config.yaml file so an extra option is just confusing. The default port to run on is 55678 if unspecified, but otherwise YAML parseable by key `opencensus_interceptor`, and then using the field name `address`. For example: ```yaml opencensus_interceptor: address: ":55777" ``` and when run with ```shell ocagent ``` which will then produce: ```shell 2018/10/08 16:36:47 Running OpenCensus interceptor as a gRPC service at "localhost:55777" ``` Fixes census-instrumentation#23
I'm planning to make this library buildable with Bazel (see bazelbuild/rules_typescript) and the Closure compiler.
As a prerequisite for that, I'm planning to refactor the way that OpenCensus Web ensures that it implements the
@opencensus/core
interfaces so that the Bazel build can be cleaner and the Closure optimization can rename a wider group of property names (including those in@opencensus/core
). My plan is as follows:@opencensus/web-core
depends on@opencensus/core
(this PR)@opencensus/core
have its own copies of the trace type interfaces, but include unit tests to ensure that itsSpan
class also correctly implements theSpan
interface in@opencensus/core
(this can be done by making a derived class that implements the interface)