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

Introduce version command and handler #517

Merged
merged 3 commits into from
Nov 9, 2017

Conversation

pavolloffay
Copy link
Member

No description provided.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 61cbf22 on pavolloffay:build-version into 2b73fe9 on jaegertracing:master.

GIT_CLOSEST_TAG=$(shell git describe --abbrev=0 --tags)
DATE=$(shell date -u +'%Y-%m-%dT%H:%M:%SZ')
BUILD_INFO_IMPORT_PATH=github.com/uber/jaeger/pkg/version
BUILD_INFO=-ldflags "-X $(BUILD_INFO_IMPORT_PATH).commitSHA=$(GIT_SHA) -X $(BUILD_INFO_IMPORT_PATH).latestVersion=$(GIT_CLOSEST_TAG) -X $(BUILD_INFO_IMPORT_PATH).date=$(DATE)"
Copy link
Contributor

Choose a reason for hiding this comment

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

wow, had no idea this was even possible.

@pavolloffay
Copy link
Member Author

also could somebody with mac run it, I am not sure if date command works there too.

@black-adder
Copy link
Contributor

black-adder commented Nov 7, 2017

Running on mac

make build-query-linux
CGO_ENABLED=0 GOOS=linux installsuffix=cgo go build -o ./cmd/query/query-linux -ldflags "-X github.com/uber/jaeger/pkg/version.commitSHA=2b73fe9aa45a54c6cbf3e9459a01a31a7ce6bdcc -X github.com/uber/jaeger/pkg/version.latestVersion=v0.9.0 -X github.com/uber/jaeger/pkg/version.date=2017-11-07T14:34:04Z" ./cmd/query/main.go

@yurishkuro
Copy link
Member

how will it work on the command line, since we now have a root command and a single sub-command

@yurishkuro
Copy link
Member

otherwise lgtm

@pavolloffay
Copy link
Member Author

./cmd/collector/collector-linux help

Jaeger collector receives traces from Jaeger agents and agent and runs them through
				a processing pipeline.

Usage:
  jaeger-collector [flags]
  jaeger-collector [command]

Available Commands:
  version     Print the version

Flags:
      --cassandra.connections-per-host int           The number of Cassandra connections from a single backend instance (default 2)
      --cassandra.keyspace string                    The Cassandra keyspace for Jaeger data (default "jaeger_v1_local")
      --cassandra.max-retry-attempts int             The number of attempts when reading from Cassandra (default 3)
      --cassandra.password string                    Password for password authentication for Cassandra
      --cassandra.port int                           The port for cassandra
      --cassandra.proto-version int                  The Cassandra protocol version (default 4)
      --cassandra.servers string                     The comma-separated list of Cassandra servers (default "127.0.0.1")
      --cassandra.socket-keep-alive duration         Cassandra's keepalive period to use, enabled if > 0 (default 0s)
      --cassandra.timeout duration                   Timeout used for queries (default 0s)
      --cassandra.username string                    Username for password authentication for Cassandra
      --collector.health-check-http-port int         The http port for the health check service (default 14269)
      --collector.http-port int                      The http port for the collector service (default 14268)
      --collector.num-workers int                    The number of workers pulling items from the queue (default 50)
      --collector.port int                           The tchannel port for the collector service (default 14267)
      --collector.queue-size int                     The queue size of the collector (default 2000)
      --collector.write-cache-ttl duration           The duration to wait before rewriting an existing service or operation name (default 12h0m0s)
      --collector.zipkin.http-port int               The http port for the Zipkin collector service e.g. 9411
      --config-file string                           Configuration file in JSON, TOML, YAML, HCL, or Java properties formats (default none). See spf13/viper for precedence.
      --dependency-storage.data-frequency duration   Frequency of service dependency calculations (default 24h0m0s)
      --es.max-span-age duration                     The maximum lookback for spans in ElasticSearch (default 72h0m0s)
      --es.num-replicas int                          The number of replicas per index in ElasticSearch (default 1)
      --es.num-shards int                            The number of shards per index in ElasticSearch (default 5)
      --es.password string                           The password required by ElasticSearch
      --es.server-urls string                        The comma-separated list of ElasticSearch servers, must be full url i.e. http://localhost:9200 (default "http://127.0.0.1:9200")
      --es.sniffer                                   The sniffer config for ElasticSearch; client uses sniffing process to find all nodes automatically, disable if not required
      --es.username string                           The username required by ElasticSearch
      --log-level string                             Minimal allowed log level (default "info")
      --span-storage.type string                     The type of span storage backend to use, options are currently [cassandra,elasticsearch,memory] (default "cassandra")

Use "jaeger-collector [command] --help" for more information about a command.

./cmd/collector/collector-linux version -h

Print the version and build information

Usage:
  jaeger-collector version [flags]

./cmd/collector/collector-linux version --cassandra.keyspace=foo

Error: unknown flag: --cassandra.keyspace
Usage:
  jaeger-collector version [flags]

{"level":"fatal","ts":1510132598.8778965,"caller":"collector/main.go:146","msg":"unknown flag: --cassandra.keyspace","stacktrace":"main.main\n\t/home/ploffay/projects/golang/src/github.com/uber/jaeger/cmd/collector/main.go:146\nruntime.main\n\t/home/ploffay/bin/go/src/runtime/proc.go:195"}

./cmd/collector/collector-linux version

{"gitCommit":"61cbf2201789915389c3f9acf12f943117aeeb48","GitVersion":"v0.9.0","BuildDate":"2017-11-08T09:14:05Z"}

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 265ddad on pavolloffay:build-version into 2b73fe9 on jaegertracing:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 843aedf on pavolloffay:build-version into 2b73fe9 on jaegertracing:master.

@pavolloffay pavolloffay merged commit a2ed9b8 into jaegertracing:master Nov 9, 2017
@ghost ghost removed the review label Nov 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants