Upyo 0.2.0 Release Notes

洪 民憙 (Hong Minhee) @hongminhee@hackers.pub

We're pleased to announce the release of Upyo 0.2.0. Upyo is a cross-runtime email library that provides a unified, type-safe API for sending emails across Node.js, Deno, Bun, and edge functions. With support for multiple email providers through interchangeable transports—including SMTP, Mailgun, SendGrid, and now Amazon SES—Upyo enables seamless switching between email services without code changes.

This release introduces two significant additions: Amazon SES transport support and comprehensive OpenTelemetry integration. These features expand transport options and add production-ready observability capabilities to the library.

Amazon SES Transport

Upyo now includes support for Amazon SES through the new @upyo/ses package. This transport provides AWS Signature v4 authentication with zero external dependencies, maintaining Upyo's commitment to cross-runtime compatibility. The implementation supports both AWS access key credentials and session-based authentication for temporary credentials.

import { SesTransport } from "@upyo/ses";
import { createMessage } from "@upyo/core";

const transport = new SesTransport({
  authentication: {
    type: "credentials",
    accessKeyId: process.env.AWS_ACCESS_KEY_ID!,
    secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY!,
  },
  region: "us-east-1",
});

const receipt = await transport.send(createMessage({
  from: "sender@example.com",
  to: "recipient@example.com",
  subject: "Hello from SES",
  content: { text: "Sent via Amazon SES!" },
}));

The SES transport includes regional configuration support, comprehensive IAM role integration through external credential providers, and efficient bulk sending capabilities. Like other Upyo transports, it provides the same consistent interface while leveraging Amazon's proven email infrastructure for reliable delivery at scale.

Configuration sets, message tagging, and rich content features are fully supported, allowing teams to take advantage of SES's advanced tracking and analytics capabilities. The transport handles AWS authentication complexity while maintaining the simple, unified API that Upyo users expect.

OpenTelemetry Integration

The new @upyo/opentelemetry package adds comprehensive observability support to any Upyo transport through a decorator pattern. This implementation provides distributed tracing, metrics collection, and intelligent error classification without requiring changes to existing email sending code.

import { createOpenTelemetryTransport } from "@upyo/opentelemetry";
import { SmtpTransport } from "@upyo/smtp";

// Wrap any existing transport with observability
const transport = createOpenTelemetryTransport(
  new SmtpTransport({ host: "smtp.example.com" }),
  {
    serviceName: "email-service",
    metrics: { enabled: true },
    tracing: { enabled: true },
  }
);

// Use exactly as before - observability is automatic
await transport.send(message);

The OpenTelemetry transport automatically instruments email operations with traces and metrics, tracking delivery rates, latency distributions, and categorizing failures by type. It integrates seamlessly with existing OpenTelemetry infrastructure, supporting both global providers and custom configurations for different deployment scenarios.

Performance optimization features include configurable sampling rates for traces and metrics, ensuring minimal overhead in high-throughput environments. The transport provides automatic resource management through Disposable/AsyncDisposable support and includes specialized monitoring capabilities for bulk email operations, making it suitable for production workloads of any scale.

Getting Involved

We're continuously working to improve Upyo and would love to hear from the community. Whether you're trying out the new Amazon SES transport, implementing observability with OpenTelemetry, or using any of our existing transports, your feedback helps shape the library's future.

If you encounter issues, have feature requests, or want to contribute, please visit our GitHub repository. We also welcome discussions about new transport implementations, documentation improvements, and integration experiences across different runtime environments.

4

No comments

If you have a fediverse account, you can comment on this article from your own instance. Search https://hackers.pub/ap/articles/019816e1-2062-7866-a3cb-8b1eda2e6822 on your instance and reply to it.