Skip to content

Commit

Permalink
docs: Misc doc changes (#128)
Browse files Browse the repository at this point in the history
List of changes:
- Sort deps
- Use common source url
- Source reference by version
- Fix typos
- Add changelog to html doc
- Changelog before readme
- Add logo to nav bar
- Remove sourcelevel 404 badge
- Badges and more badges!
  • Loading branch information
kianmeng authored and zachdaniel committed Jan 25, 2021
1 parent 6cf608f commit 45653db
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
[![Inline docs](http://inch-ci.org/github/spandex-project/spandex.svg)](http://inch-ci.org/github/spandex-project/spandex)
[![Coverage Status](https://coveralls.io/repos/github/spandex-project/spandex/badge.svg)](https://coveralls.io/github/spandex-project/spandex)
[![Hex pm](http://img.shields.io/hexpm/v/spandex.svg?style=flat)](https://hex.pm/packages/spandex)
[![SourceLevel](https://app.sourcelevel.io/github/spandex-project/spandex.svg)](https://app.sourcelevel.io/github/spandex-project/spandex)
[![Total Download](https://img.shields.io/hexpm/dt/spandex.svg)](https://hex.pm/packages/spandex)
[![License](https://img.shields.io/hexpm/l/spandex.svg)](https://github.com/spandex-project/spandex/blob/master/LICENSE)

View the [documentation](https://hexdocs.pm/spandex)

Expand All @@ -15,8 +16,8 @@ runtime of your system. Using distributed tracing, you can also get a view of
how requests make their way through your entire ecosystem of microservices or
applications. Currently, Spandex only supports integrating with
[datadog](https://www.datadoghq.com/), but it is built to be agnostic to what
platform you choose to view your trace data. Eventually it should support open
zipkin, Stackdriver, and any other trace viewer/aggregation tool you'd like to
platform you choose to view your trace data. Eventually it should support Open
Zipkin, Stackdriver, and any other trace viewer/aggregation tool you'd like to
integrate with. We are still under active development, working on moving to a
more standard/generic implementation of the internals. Contributions welcome!

Expand All @@ -31,7 +32,7 @@ This is Datadog-specific since that's currently the only adapter.
* Include the adapter as a dependency (see below).
* Replace any occurrences of `Spandex.Adapters.Datadog` with
`SpandexDatadog.Adapter` in your code.
* Replace any occurences of `Spandex.Adapters.ApiSender` with
* Replace any occurrences of `Spandex.Adapters.ApiSender` with
`SpandexDatadog.ApiSender` in your code.

## Adapters
Expand Down Expand Up @@ -100,9 +101,9 @@ For adapter configuration, see the documentation for that adapter

There are 3 plugs provided for usage w/ Phoenix:

* `Spandex.Plug.StartTrace` - See moduledocs for options. Goes as early in your
* `Spandex.Plug.StartTrace` - See module docs for options. Goes as early in your
pipeline as possible.
* `Spandex.Plug.AddContext` - See moduledocs for options. Either after the
* `Spandex.Plug.AddContext` - See moduledoc for options. Either after the
router, or inside a pipeline in the router.
* `Spandex.Plug.EndTrace` - Must go *after* your router.

Expand Down
2 changes: 1 addition & 1 deletion lib/trace.ex
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defmodule Spandex.Trace do
* `baggage`: Key-value metadata about the overall trace (propagated across distributed service)
* `id`: The trace ID, which consistently refers to this trace across distributed services
* `priority`: The trace sampling priority for this trace (propagated across distributed services)
* `spans`: The set of completed spans for this trace from this proces
* `spans`: The set of completed spans for this trace from this process
* `stack`: The stack of active parent spans
"""
defstruct baggage: [],
Expand Down
25 changes: 13 additions & 12 deletions mix.exs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
defmodule Spandex.Mixfile do
use Mix.Project

@source_url "https://github.com/spandex-project/spandex"
@version "3.0.3"

def project do
Expand All @@ -15,7 +16,6 @@ defmodule Spandex.Mixfile do
package: package(),
name: "Spandex",
docs: docs(),
source_url: "https://github.com/spandex-project/spandex",
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
"coveralls.circle": :test,
Expand All @@ -32,25 +32,25 @@ defmodule Spandex.Mixfile do
end

defp package do
# These are the default files included in the package
[
name: :spandex,
maintainers: ["Zachary Daniel", "Andrew Summers", "Greg Mefford"],
licenses: ["MIT License"],
links: %{"GitHub" => "https://github.com/spandex-project/spandex"}
links: %{"GitHub" => @source_url}
]
end

defp docs do
[
main: "readme",
extras: [
"README.md"
]
logo: "static/spandex.png",
source_url: @source_url,
source_ref: @version,
extras: ["CHANGELOG.md", "README.md"],
skip_undefined_reference_warnings_on: ["CHANGELOG.md"]
]
end

# Specifies which paths to compile per environment.
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]

Expand All @@ -61,14 +61,15 @@ defmodule Spandex.Mixfile do
{:dialyxir, "~> 0.5", only: [:dev], runtime: false},
{:ex_doc, ">= 0.19.0", only: :dev, runtime: false},
{:excoveralls, "~> 0.10", only: :test},
{:nimble_parsec, "~> 0.5.3", only: :dev},
{:makeup_elixir, "~> 0.14.0", only: :dev},
{:git_ops, "~> 2.0.0", only: :dev},
{:makeup, "~> 1.0.1", only: :dev},
{:inch_ex, github: "rrrene/inch_ex", only: [:dev, :test]},
{:makeup, "~> 1.0.1", only: :dev},
{:makeup_elixir, "~> 0.14.0", only: :dev},
{:nimble_parsec, "~> 0.5.3", only: :dev},

{:decorator, "~> 1.2", optional: true},
{:optimal, "~> 0.3.3"},
{:plug, ">= 1.0.0"},
{:decorator, "~> 1.2", optional: true}
{:plug, ">= 1.0.0"}
]
end
end

0 comments on commit 45653db

Please sign in to comment.