Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #727 +/- ##
==========================================
- Coverage 92.59% 90.90% -1.69%
==========================================
Files 226 233 +7
Lines 10216 10506 +290
Branches 925 962 +37
==========================================
+ Hits 9460 9551 +91
- Misses 756 955 +199
🚀 New features to boost your workflow:
|
mayurkale22
left a comment
There was a problem hiding this comment.
Overall I like the idea, added a few comments in the first phase.
vmarchaud
left a comment
There was a problem hiding this comment.
i didn't reviewed every files but it seems good, i mostly want to say that i agree with that changes.
| } | ||
|
|
||
| /** | ||
| * Set the current global tracer. Returns the initialized global tracer registry |
There was a problem hiding this comment.
if this function only sets registry, it should have different name then init
Maybe add or set because it doesn't init anything
There was a problem hiding this comment.
This was brought over from the old core package. A rename like this could be discussed though. cc @mayurkale22
| import { Status } from './status'; | ||
| import { TraceFlags } from './trace_flags'; | ||
|
|
||
| export const INVALID_TRACE_ID = '0'; |
There was a problem hiding this comment.
why is it 0 and not empty for example ?
There was a problem hiding this comment.
This was the exact example in the old core package. I think because it needs to satisfy the typings of the TraceContext interface.
|
@markwolff and @xiao-lix it would be nice if you can review this change. |
markwolff
left a comment
There was a problem hiding this comment.
Overall SGTM. Agree with the concept as I think it is what other SIGs (e.g python) were already doing.
| it('should return no op metric if name is an empty string', () => { | ||
| const counter = meter.createCounter(''); | ||
| assert.ok(counter instanceof NoopMetric); | ||
| assert.ok(counter instanceof types.NoopMetric); |
There was a problem hiding this comment.
nit: I usually expect * as types imports to be only used for types and to be compiled away.
There was a problem hiding this comment.
An instanceof cannot be compiled away because it is a runtime check. In any case, this is a test not deployed code.
There was a problem hiding this comment.
Yes sorry I should have been more clear. I am proposing renaming this to * as core or * as api, but as you've stated this is only a test so its only a nit :)
There was a problem hiding this comment.
Even if it wasn't a test, this is an instanceof check which is a runtime check that can't be compiled away.
There was a problem hiding this comment.
I agree. My point is that because it is not being compiled away, using import * as types here is misleading because it is being used for something other than just compile-time types.
|
Looks like one of our dependencies doesn't like node 8 anymore and requires 10 or higher |
|
Will have to update the documentation in |
* feat: create an api package * chore: update circle for new api package * chore: bring back getTracer * chore: add wrongly removed dev dependency * chore: review comments * chore: review comments * chore: lint * chore: export all noop implementations * chore: update API README * chore: ignore known working links that are not yet published * chore: add jsdoc for getInstance calls * chore: add jsdoc for private constructors * chore: review comments * chore: fix readme npm url * chore: fix old readmes without registry * chore: update api calling convention
* feat: create an api package * chore: update circle for new api package * chore: bring back getTracer * chore: add wrongly removed dev dependency * chore: review comments * chore: review comments * chore: lint * chore: export all noop implementations * chore: update API README * chore: ignore known working links that are not yet published * chore: add jsdoc for getInstance calls * chore: add jsdoc for private constructors * chore: review comments * chore: fix readme npm url * chore: fix old readmes without registry * chore: update api calling convention
Co-authored-by: Amir Blum <amir@aspecto.io> Co-authored-by: Bartlomiej Obecny <bobecny@gmail.com>
Which problem is this PR solving?
Short description of the changes
@opentelemetry/typesto@opentelemetry/api@opentelemetry/api@opentelemetry/apiTODO:
browser tests for API