Giter VIP home page Giter VIP logo

common-rs's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

common-rs's Issues

tracing-actix-web-mozlog: Remove request.summary fields from tracing span

Currently many fields that are recommended for mozlog's request.summary event are also including the general tracing span values. This makes it harder for downstream consumers to control what is in their logs, and it unneededly bloats each log line in our current JSON formatter (which includes fields from all parent spans in each log line).

We should remove unneeded fields from this span, especially path and agent. The request ID field (rid) should stay in place, so that events can be tied together.

actix-web-location: Use `compile_error!` to generate feature-related errors

We are currently using deprecation warnings to generate compiler messages when either both or neither of the actix-web-v3 and actix-web-v4 features are being compiled. Instead, let's use the compile_error! macro to generate compiler errors:

#[cfg(all(feature = "actix-web-v3", feature = "actix-web-v4"))]
compile_error!("Only one of actix-web-v3 and actix-web-v4 can be used at once.");

#[cfg(not(any(feature = "actix-web-v3", feature = "actix-web-v4")))]
compile_error!("Exactly one of actix-web-v3 or actix-web-v4 must be specified.");

tracing-actix-web-mozlog: Semantic concerns (like adding request ID to the fields) should not be mixed with formatting concerns (logging as JSON)

Currently the JSON formatter performs several transformations of the data beyond formatting it as compatible JSON. This can be a problem for debugging or other environments that want to use human readable logs, but test the transformations that make this valid mozlog.

We should separate the two sets of concerns into two or more independent layers that can each be used separately.

tracing-actix-web-mozlog: Add layer that can configure the fallback layer for the `type` field

Currently the mozlog formatter uses "<unknown>" as a value for any event that doesn't have a type field. This should be configurable by users of the library. One way this could be done is to add an optional layer that users can add that fills in a value for this field if none is provided by passing events to a bit of user-specified code. That code could inspect the event and determine the proper type.

Any events that arrive via the log facade's shim can't have a type field, which is a case we'll need to be able to handle. To that end it should be possible to determine where the event came from in the fallback code provided.

CODE_OF_CONDUCT.md file missing

As of January 1 2019, Mozilla requires that all GitHub projects include this CODE_OF_CONDUCT.md file in the project root. The file has two parts:

  1. Required Text - All text under the headings Community Participation Guidelines and How to Report, are required, and should not be altered.
  2. Optional Text - The Project Specific Etiquette heading provides a space to speak more specifically about ways people can work effectively and inclusively together. Some examples of those can be found on the Firefox Debugger project, and Common Voice. (The optional part is commented out in the raw template file, and will not be visible until you modify and uncomment that part.)

If you have any questions about this file, or Code of Conduct policies and procedures, please reach out to [email protected].

(Message COC001)

Fix circleci integration

We have a working circleci config that runs but the status checks aren't being sync'd with PRs. Nor can we block PRs on these status checks passing.

Rename master -> main

In the last two years Github, Mozilla and many orgs renamed master -> main as part of an inclusive language push. Would love to see that here. Happy to provide more context if it's needed.

actix-web-location: Handle more x-forwarded-for formats

x-forwarded-for headers from frontends tend include a list of proxy ip addresses encountered during the request, separated by a comma.

Certain frontends are known to send ip addresses with their port number included, e.g. 1.1.1.1:1026.

We're not currently handling these cases.

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.