glassechidna / awshoney Goto Github PK
View Code? Open in Web Editor NEWAWS fields for your Honeycomb.io traces
License: Apache License 2.0
AWS fields for your Honeycomb.io traces
License: Apache License 2.0
There are a couple of options:
The first option is to make a judgment call and enumerate the most popular APIs and add some high-value fields to those calls. For example, S3 API calls could include bucket names (and object keys), DynamoDB could include table names.
The second option is including the input (and maybe output?) as a single JSON-encoded field and users enabling automatic unpacking of nested JSON values (as per Honeycomb docs). Maybe this one should be an opt-in / opt-out.
Anyone have any thoughts?
I've forgotten - on more than one occasion - to flush outstanding Honeycomb spans yet to be sent. Maybe we should include something like:
package honeyflush
import (
"context"
"github.com/aws/aws-lambda-go/lambda"
"github.com/honeycombio/beeline-go"
)
type wrapper struct {
inner lambda.Handler
}
func (w *wrapper) Invoke(ctx context.Context, payload []byte) ([]byte, error) {
ctx, _ = beeline.StartSpan(ctx, "lambda")
// we could also include the aws lambda "request id" for correlation with cloudwatch logs
defer beeline.Flush(ctx)
return w.inner.Invoke(ctx, payload)
}
func Wrap(inner lambda.Handler) lambda.Handler {
return &wrapper{inner: inner}
}
Usage would be something like
package main
import (
"context"
"github.com/aws/aws-lambda-go/events"
"github.com/aws/aws-lambda-go/lambda"
"github.com/glassechidna/flow/pkg/honeyflush"
)
func mainx() {
handler := lambda.NewHandler(handlerFn)
wrapped := honeyflush.Wrap(handler)
lambda.StartHandler(wrapped)
}
func handlerFn(ctx context.Context, event events.SQSEvent) error {
return nil
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.