Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix getting started guide #512

Merged

Conversation

mauriciovasquezbernal
Copy link
Member

This commit fixes a series of issues in the getting started guide:

To reviewers:
Please check that the old configuration isn't actually working for you and the new one solves it.

@mauriciovasquezbernal mauriciovasquezbernal requested a review from a team as a code owner March 19, 2020 14:26
@mauriciovasquezbernal mauriciovasquezbernal added the doc Documentation-related label Mar 19, 2020
This commit fixes a series of issues in the getting started guide:
- Avoid using relative paths for docker volumes. Use `pwd` instead:
  moby/moby#4830 (comment)
- Fix indentation in prometheus config
- Fix otcollector example
  - Missing span processor
  - Remove sampling_initial and sampling_thereafter keys in config
@codecov-io
Copy link

codecov-io commented Mar 19, 2020

Codecov Report

Merging #512 into master will decrease coverage by 0.13%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #512      +/-   ##
==========================================
- Coverage   89.48%   89.34%   -0.14%     
==========================================
  Files          43       43              
  Lines        2215     2215              
  Branches      250      250              
==========================================
- Hits         1982     1979       -3     
- Misses        161      162       +1     
- Partials       72       74       +2     
Impacted Files Coverage Δ
...elemetry-api/src/opentelemetry/context/__init__.py 90.90% <0.00%> (-4.55%) ⬇️
...emetry-sdk/src/opentelemetry/sdk/trace/__init__.py 92.12% <0.00%> (-0.40%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2a05f68...e6a153b. Read the comment docs.

Copy link
Member

@toumorokoshi toumorokoshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested in, works for me! Thanks for the fixes. I think I didn't port back every change as I was flitting back and forth.


And start a docker container for it:

.. code-block:: sh

# --net=host will not work properly outside of Linux.
docker run --net=host -v ./prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus\
docker run --net=host -v `pwd`/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thoughts on maybe just calling out /tmp/ as a directory here? I've found that little tricks like backticks and the pwd command get lost on people newer to linux or programming in general.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, another issue is that pwd is unix only. I updated it to /tmp/.

@@ -433,6 +431,7 @@ And execute the following script:
)
tracer_provider = TracerProvider()
trace.set_tracer_provider(tracer_provider)
span_processor = BatchExportSpanProcessor(span_exporter)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An aside, but should we be using SimpleSpanProcessors in our examples? I feel like being available as an example is the point.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good question. I personally prefer to use the batch one because I don't want to create the impression that the simple is the default choice. Maybe we could adopt the convention of using SimpleSpanProcessor for the console span exporter and the BatchSpanProcessor for the others.

@mauriciovasquezbernal mauriciovasquezbernal added the needs reviewers PRs with this label are ready for review and needs people to review to move forward. label Mar 25, 2020
Copy link
Member

@hectorhdzg hectorhdzg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@c24t c24t left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, minor comment only.

docs/getting-started.rst Show resolved Hide resolved
@mauriciovasquezbernal mauriciovasquezbernal added the PR:please merge This PR is ready to be merged by a Maintainer (has enough valid approvals, successful build, etc.) label Mar 26, 2020
@toumorokoshi toumorokoshi merged commit 44b5b04 into open-telemetry:master Mar 27, 2020
@mauriciovasquezbernal mauriciovasquezbernal deleted the mauricio/fix-getting-started-guide branch April 14, 2020 21:50
srikanthccv pushed a commit to srikanthccv/opentelemetry-python that referenced this pull request Nov 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Documentation-related needs reviewers PRs with this label are ready for review and needs people to review to move forward. PR:please merge This PR is ready to be merged by a Maintainer (has enough valid approvals, successful build, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants