Comments (5)
This "Are the types wrong?" tool is really helpful for types and more general package issues.
It found a few issues
You can also npm pack
a local install and upload it to iterate on the changes. There's also a CLI
from otel-cf-workers.
Hey! I am absolutely no wizard in module systems either.
But you are absolutely correct in that I would like this to "just work" for everyone.. so certainly going to have a look to see what the best way forward is.
from otel-cf-workers.
Ok.. so I have tried to follow the gist of all the module system wizards and it looks like it works now, but I would love for you to give this a go and check if that is indeed actually the case. It was released in 1.0.0-rc3
.
from otel-cf-workers.
@evanderkoogh Thanks for looking at this issue!
Can you please check your index.ts
? There are a couple of imports without .js
left.
UPD
For now, I decided to fix them manually to see what will be the result (sorry I didn't do it earlier)
Found couple of other places:
sdk.ts
(the very bottom):export { waitUntilTrace } from './instrumentation/fetch';
provider.ts
: import { AsyncLocalStorageContextManager } from './context'
Then I got another error:
file:///xxx/node_modules/@microlabs/otel-cf-workers/dist/esm/spanprocessor.js:2
import { stateMachine } from 'ts-checked-fsm';
^^^^^^^^^^^^
SyntaxError: Named export 'stateMachine' not found. The requested module 'ts-checked-fsm' is a CommonJS module, which
may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from 'ts-checked-fsm';
const { stateMachine } = pkg;
I rewrote the import to
import fsm from 'ts-checked-fsm';
import { getActiveConfig } from './config.js';
const { stateMachine } = fsm;
Then I got:
> npx mocha
ReferenceError: caches is not defined
at _instrumentGlobalCache (file:///xxx/node_modules/@microlabs/otel-cf-workers/dist/esm/instrumentation/cache.js:67:30)
And this is probably because I try to run tests in a NodeJS runtime where there is no CacheStorage available, because it is not a browser nor a Worker runtime like a Miniflare.
I think I will additionally migrate the tests to wrangler dev
to use Miniflare then...
Maybe couple of mentioned imports are worth to fix for consistency, though.
Thanks again.
from otel-cf-workers.
Right..
So I just retested 1.0.0-rc.7
and it passed all of the things.
Can you let me know if this still happens?
from otel-cf-workers.
Related Issues (20)
- Pages function support HOT 3
- Browser Rendering API Breaks When Instrumenting HOT 5
- The global tracer is not of type WorkerTracer and can not export spans HOT 3
- getActiveConfig() returns null HOT 8
- [Question] Does this also intercept logs and send it? HOT 1
- cache.hit attribute is the opposite
- feature request: export const unwrappedFetch = unwrap(fetch)
- [Question] Support for sending traces to other tracing backends/vendors? HOT 4
- [feature request/question] support without node dependencies HOT 4
- [feature request]: Support for Cloudflare Pages HOT 7
- getTracer + startActiveSpan not working due to missing global patch HOT 2
- Errors importing module HOT 1
- Accurate timings when instrumenting code that doesn't do network IO HOT 5
- [Bug] `trace.getActiveSpan()` returns undefined, regression HOT 5
- Instrumentation breaks new RPC style service calls HOT 12
- RFC: Removing CommonJS support
- Question: Ignore certain hosts or api calls with a header HOT 1
- [feature request]: Support for JSRPC services
- Help with `trace.getActiveSpan()` and `startActiveSpan()` HOT 2
- Bug: Calling a Service Binding RPC method throws a DOMException
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from otel-cf-workers.