opentelemetry-js
nestjs-commander
opentelemetry-js | nestjs-commander | |
---|---|---|
17 | 11 | |
2,652 | 426 | |
2.2% | - | |
9.5 | 8.3 | |
5 days ago | 6 days ago | |
TypeScript | TypeScript | |
Apache License 2.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
opentelemetry-js
-
Using Env Vars to Include & Exclude OpenTelemetry Node.js Libraries
To enable only @opentelemetry/instrumentation-http and @opentelemetry/instrumentation-express you can run this command below.
-
OpenTelemetry Journey #01 - Important concepts
JavaScript
-
OpenTelemetry in 2023
> OpenTelemetry is a marketing-driven project, designed by committee, implemented naively and inefficiently, and guided by the primary goal of allowing Fortune X00 CTOs to tick off some boxes on their strategy roadmap documents.
I'm the founder of highlight.io. On the consumer side as a company, we've seen a lot of value of from OTEL; we've used it to build out language support for quite a few customers at this point, and the community is very receptive.
Here's an example of us putting up a change: https://github.com/open-telemetry/opentelemetry-js/pull/4049
Do you mind sharing why you think no-one should be using it? Some reasoning would be nice.
-
OpenObserve: Elasticsearch/Datadog alternative in Rust.. 140x lower storage cost
That's traces? I was wondering if I could use https://github.com/open-telemetry/opentelemetry-js/tree/main...
-
OpenObserve: Open source Elasticsearch/Datadog/Splunk alternative in Rust for logs. 140x lower storage cost
Nothing like Faro for now. However, https://github.com/open-telemetry/opentelemetry-js can be used to achieve the same result and OpenObserve has great support for Opentelemetry.
- Deno 1.33: Deno 2 is coming
-
Observable front-end applications - an open source product experiment
Can it be integrated with Grafana Faro or OpenTelemetry?
-
Logs and tracing: not just for production, local development too
4. Register automatic instrumentations. For example, you can automatically trace all XHR requests, fetch requests, page loads, and user interactions. With distributed tracing, you should always prefer automatic instrumentation whenever possible to reduce maintenance and leverage existing conventions. The document load instrumentation allows you to treat the server as the parent span to a given page load, from which the client will then be the root span to everything in the server. This is an extremely powerful concept that allows traces to viewed from the perspective of the user, encapsulating all requests and user interactions in a single trace with no manual instrumentation!
We also trialed Sentry's APM tool (also marketed as a distributed tracing tool). While it had pretty charts, dashboards, niceties like core web vitals, and integrated well with Sentry's error product, its utility as a distributed tracing tool is significantly less powerful than tools like Honeycomb. You will end up using a large amount of your user's bandwidth sending telemetry data that can't fully be leveraged in the Sentry UI. When I last used (in April 2021), the spans of a given trace could only be viewed in a specific part the UI and they couldn't be searched for in queries or used in charts. I'm unsure if this has been updated. But this is not the worse part. Because Sentry uses its own data model for traces, it is not compatible with open source standards such as OpenTelemetry or OpenTracing! The sales team will not tell you this during the trial. This means our entire backend, which was already instrumented with OpenTracing, would now also need to instrument Sentry's tracing (...if they supported the language) in order to connect frontend traces to backend traces. Each team I met with their sales team, I said the same thing: support OpenTelemetry, otherwise you are asking for us to further isolate our backend and frontend teams.
It looks like they have heard this opinion, as they have recently published a blog post about the evolution of the distributed tracing API, citing incompatibility with OpenTelemetry due to their data model. It will require a very large change for them to support this. Meanwhile, OpenTelemetry can be used with any tracing vendor, a large number of languages, the other major instrumentation standards (OpenTracing, OpenCensus), and any trace propagation format.
- [1]: https://github.com/open-telemetry/opentelemetry-js
-
Monitoring consumer lag in Azure Event Hub
Consumer lag will quickly show any functional or technical issue with your event stream. By using the code examples from this blogpost, you can avoid having to dive into the SDKs yourself. Of course, you can adopt the metric collection to send the metric to the logs or to another metrics system like prometheus, datadog, or open telemetry.
-
Any good tutorial showing you which library to use for dependency injection in a project?
I would work on getting Open Telemetry pointed at an βall-in-oneβ Jaegar instance and move on from there: https://www.jaegertracing.io/docs/1.25/getting-started/ https://github.com/open-telemetry/opentelemetry-js Various cloud providers may have a way to collect/view traces as well, but, Jaegar and the Open Telemetry Collector are the open source way to do that. The projects are in the process of converging in some ways β everything is in flux.
nestjs-commander
-
Nestjs + pnpm monorepo
To echo the other's here, Nx has been an amazing dev experience for me! I use it for ogma, for nest-commander, testing-nestjs, and for nest-samples and @nest-lab/, all using pnpm as a package manager.
-
Node.js frameworks
This absolutely isn't true. I'm both on the core team and a maintainer of several open source modules for Nest (nest-commander for CLI creation, ogma my own logger that has a really powerful interceptor, nestjs-spelunker which can print out an object representation of your Nest application and help with module debugging for dependency resolution, and a few more). The command module is even featured in the docs.
-
Few questions about Nest.js architecture
4) Nest is great for architectural consistency, but one drawback of the framework is boot time. It's nowhere near as bad as Spring or .NET, but it is much slower than a standard Node or Express server. Though, the new Lazy Loading does help to alleviate some of that pain. Running nest in serverless environments does take extra setup, but it is usable, and packages like nest-commander make it viable for CLIs too. Personally, I pretty much don't write Node applications if they aren't in Nest unless I'm writing super rough prototypes. Typescript has become a must for any long term application, and the structure Nest brings outweighs just about any downsides I've seen from it
-
So far one of the best tools to build CLI interfaces is Oclif by Heroku. What are you all using?
I work with the NestJS framework a lot and ended up writing nest-commander as a commander wrapper for NestJS, so my CLIs and servers can use the same framework. Lately I've been working on adding in plugin support too.
-
Automating your package deployment in an Nx Monorepo with Changeset
Overall, I'm pretty excited to have this flow automated and working through three of my favorite package management tools. Everything will also work if you're using a yarn workspace instead, just change the sed script to modify the workspace file for yarn instead of the one for pnpm. I'm currently using this for my ogma and nest-commander repositories, feel free to have a look if you need some inspiration and/or real life examples. If you're developing packages and using an Nx workspace and need automated package deployment, give this a shot.
-
Any good tutorial showing you which library to use for dependency injection in a project?
There's also packages like nest-commander (disclaimer: that one is also mine) for making CLI applications instead of HTTP servers.
-
Building RESTful API's with Node. What's your approach?
I've used Express, Fastify, and NestJS for the most part. I almost exclusively work with NestJS now, as you can imagine. The fact that it has an opinionated structure for how to architect your application is something that drew me in to begin with. With almost every Nest application I can pick it up, scan the structure, and have a good idea of what's going to be happening at a very high level. It also has defined classes with specific roles. A guard will always be used for authentication, a pipe will always be for transformation and validation of request information, a filter will always be for error handling. The only one that doesn't have a "this is always for that" is an interceptor, which is pretty much your middleware of the Nest world. Logging, caching, response mapping, it can do it all. There's also using Nest for more than just web servers, as there's nest-commander (one of my packages) for CLI applications, and there's discord bot packages for Nest as well.
-
I built a console command package for NestJS
Overall it looks pretty good. I prefer having each class as it's own command line how nest-commander does it, but this seems to be a pretty good alternative
-
Creating a web server with typescript, should I go for express or fastify? Which one has better packages for typescript integration? Any recommendations for packages for each?
There's two underlying packages, one for either HTTP adapter, @nestjs/platform-express and @nestjs/platfoorm-fastify. Both of these have HttpAdapter classes that implement the abstract HttpAdapter that Nest uses as a main interface. Nest doesn't actually need the adapters to run either, you can make a microservice application that doesn't have any HTTP components, or even CLI applications with community packages (disclaimer: that one is mine). Nest is really there to help provide the modular system and help with architecture (in my opinion).
-
Introducing nest-commander
For more information on the project you can check the repo here. There's also a testing package to help with testing both the commander input and the inquirer input. Feel free to raise any issues or use the #nest-commander channel on the official NestJS Discord
What are some alternatives?
Sentry - Developer-first error tracking and performance monitoring
nest-console - Create beautiful CLI commands in your NestJS Applications
prom-client - Prometheus client for node.js
routing-controllers - Create structured, declarative and beautifully organized class-based controllers with heavy decorators usage in Express / Koa using TypeScript and Routing Controllers Framework.
PostHog - π¦ PostHog provides open-source product analytics, session recording, feature flagging and A/B testing that you can self-host.
InversifyJS - A powerful and lightweight inversion of control container for JavaScript & Node.js apps powered by TypeScript.
signoz - SigNoz is an open-source observability platform native to OpenTelemetry with logs, traces and metrics in a single application. An open-source alternative to DataDog, NewRelic, etc. π₯ π₯. π Open source Application Performance Monitoring (APM) & Observability tool
Ink - π React for interactive command-line apps
nx - Smart Monorepos Β· Fast CI
testing-nestjs - A repository to show off to the community methods of testing NestJS including Unit Tests, Integration Tests, E2E Tests, pipes, filters, interceptors, GraphQL, Mongo, TypeORM, and more!
gluegun - A delightful toolkit for building TypeScript-powered command-line apps.