Git Product home page Git Product logo

tau's Introduction

tau's People

Contributors

orbz avatar dependabot[bot] avatar seantan22 avatar vasyharan avatar

Watchers

Dave Hauenstein avatar Jean Barmash avatar IDispose avatar James Cloos avatar Cody avatar Garrett Montague avatar Gregory Hunt avatar  avatar

tau's Issues

Data race in getSource

Data race in cached source location information. Shouldn't have a bad impact on things, worst case additional lookups will be done, but should be fixed regardless so it doesn't hit -race testing for consuming libraries.

Add detail convenience methods

Instead of just the WithDetail[s] methods, there should convenience methods to add common detail types:

log.String("result", "success").Duration("elapsed", time.Since(t)).Info("call complete")

Time field breaks Stackdriver ingest on GCE COS

Including a time field in the JSON messages triggers a bug in the fluentd agent on GCE container optimized OS resulting in the log lines being silently dropped. Fix is to remove that field, which will reduce a bit of functionality for locally running, but will result in no changes when running in the cloud as timestamp is auto-populated at ingest time.

Set up auto format action

An action should be set up to automate:

  • Go generate
  • Go format
  • Go mod tidy
  • Markdown format
  • Protobuf format

Set up CI action

Action should run on all PR's and commits.

  • Go build
  • Go/Proto Lint
  • Go test

Convenience methods for adding details

We should implement a few convenience methods in order to reduce the constant use of map[string]interface{}{"":...}

We can include type Fields map[string]interface{} to add a map of details or a WithDetail method which takes in (string, struct) for adding a single detail in a less verbose way.

Custom serialization for Entries

Entries currently leverage encoding/json to serialize. We can create a custom serializer that should result in faster performance.

Implement log.Logger interface

A number of packages allow for including a log.Logger that they'll use. Slog should implement that interface such that it can be used for those.

Slog does not allow for properly nesting logs

Log entries created by slog do not currently allow for multiple levels of logging to easily occur.

Examples:

  • Adding a label will apply to all future logs from a given entry, even if it's no longer relevant
  • Adding a sub-span will require the original span for an entry to need to be rewritten

slog entries should be cloned between usages, which should still have negligible impact.

Optimize json encoding

Currently slog will Marshal to a buffer, resulting in potential large allocations. We should just encode directly to the output stream.

Add convenience config methods for common cloud constructs

It should be able to create simple configurable cloud clients. e.g.

var (
  spanner = config.Spanner("database", "/projects/test/instances/test/databases/test", "main database")
  topic = config.Topic("topic", "next-step", "topic to notify on completion")
)

Allow for untyped details

Freeform metadata is currently restricted to the labels string to string map. Stackdriver log explorer allows for more operations on non-string types such as comparators on numbers or nested maps. There should be a Details map[string]interface{} to support adding these types.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.