How instana/nodejs works
Main Components
• Traditional Tracing:
– @instana/collector: This is the core package used in server-based environments.
• Serverless Environment Components:
– @instana/aws-fargate
– @instana/aws-lambda
– @instana/google-cloud-run
– @instana/azure-container-services
– Also include @instana/serverless-collector for other serverless scenarios.
• Shared and Supporting Libraries:
– Packages like “core,” “autoprofile,” “collector,” “metrics-util,” “opentelemetry-exporter,” “opentelemetry-sampler,” “shared-metrics,” etc.
– These provide underlying support (such as low-level instrumentation, metrics processing, and native addon support) that feed into both server-based and serverless tracer packages.
Relationships & Interactions
• Dependency relationships between the “core” or “shared” packages and the higher-level tracer packages. For example, illustrate that @instana/collector, aws-fargate, and others rely on common utilities found in “core” or “metrics-util.”
CI/CD, Testing, and Tooling
• A separate section or side-notes for build and test infrastructure (GitHub Actions, Tekton pipelines, husky hooks, eslint, prettier configurations, etc.).
• That deployment artifacts (for instance, Docker images in the dockerfile-examples folder) integrate with instructional/example apps that demonstrate real-world usage.
Architectural Patterns & Design Principles
• Use a “monorepo” pattern where multiple inter-related packages maintain shared configurations and common tooling.
• Separation between the core instrumentation logic (handled in packages such as “collector” and “core”) and the environment-specific wrappers (like aws-lambda or google-cloud-run).
• Integration points with native addons (see the autoprofile package, binary executables in bin/, and native dependency packs) that optimize performance by interfacing with Node’s underlying systems.