openzipkin / zipkin

Zipkin is a distributed tracing system
https://zipkin.io/
Apache License 2.0
16.97k stars 3.09k forks source link

zipkin-query doesn't respect flags #1041

Closed eirslett closed 8 years ago

eirslett commented 8 years ago

I tried to overload lookback=12345, for testing. This is my start script:

export MYSQL_USER=zipkin
export MYSQL_PASS=zipkin
cd zipkin
java -jar zipkin-query-service/build/libs/zipkin-query-service-1.37.1-SNAPSHOT-all.jar -f zipkin-query-service/config/query-mysql.scala -zipkin.queryService.lookback=12345

It fails with this message:

Error parsing flag "zipkin.queryService.lookback": flag undefined
usage: com.twitter.zipkin.query.Main [<flag>...]
flags:
  -f='java.lang.String': path to scala configuration file. Searches for a file path first, then inside the jar.
  -help='false': Show this help
global flags:
  -com.twitter.finagle.exp.scheduler='local': Which scheduler to use for futures <local> | <lifo> | <bridged>[:<num workers>] | <forkjoin>[:<num workers>]
  -com.twitter.finagle.loadbalancer.defaultBalancer='choice': Default load balancer
  -com.twitter.finagle.loadbalancer.exp.loadMetric='leastReq': Metric used to measure load across endpoints (leastReq | ewma)
  -com.twitter.finagle.loadbalancer.perHostStats='false': enable/default per-host stats.
        When enabled,the configured stats receiver will be used,
        or the loaded stats receiver if none given.
        When disabled, the configured stats receiver will be used,
        or the NullStatsReceiver if none given.
  -com.twitter.finagle.netty3.numWorkers='16': Size of netty3 worker pool
  -com.twitter.finagle.stats.debugLoggedStatNames='': Comma separated stat names for logging observed values (set via a -D system property to avoid load ordering issues)
  -com.twitter.finagle.stats.format='commonsmetrics': Format style for metric names (ostrich|commonsmetrics|commonsstats)
  -com.twitter.finagle.stats.scopeSeparator='/': Override the scope separator.
  -com.twitter.finagle.stats.statsFilter='': Comma-separated regexes that indicate which metrics to filter out
  -com.twitter.finagle.stats.statsFilterFile='': Comma separated files of newline separated regexes that indicate which metrics to filter out
  -com.twitter.finagle.stats.useCounterDeltas='false': Return deltas for counters instead of absolute values. Provides compatibility with the behavior from 'Ostrich'
  -com.twitter.finagle.thrift.maxReusableBufferSize='16384.bytes': Max size (bytes) for ThriftServiceIface reusable transport buffer
  -com.twitter.finagle.tracing.debugTrace='false': Print all traces to the console.
  -com.twitter.finagle.util.loadServiceDenied='': A deny list of implementations to ignore. Keys are the fully qualified class names. Any other implementations that are found via `LoadService.apply` are eligible to be used.
  -com.twitter.finagle.util.loadServiceIgnoredPaths='': Additional packages to be excluded from recursive directory scan
  -com.twitter.finagle.zipkin.host='localhost:1463': Host to scribe traces to
  -com.twitter.finagle.zipkin.initialSampleRate='0.001': Initial sample rate
  -com.twitter.jvm.numProcs='8.0': number of logical cores
  -com.twitter.scrooge.ThriftStructSerializer.maxReusableBufferSize='16384': Max bytes for ThriftStructSerializers reusable transport buffer
  -com.twitter.server.announcerMap='': A list mapping service names to announcers (gizmoduck=zk!/gizmoduck)
  -com.twitter.server.promoteBeforeServing='true': Promote objects in young generation to old generation before serving requests. May shorten the following gc pauses by avoiding the copying back and forth between survivor spaces of a service's long lived objects.
  -com.twitter.server.resolverMap='': A list mapping service names to resolvers (gizmoduck=zk!/gizmoduck)
  -com.twitter.util.events.approxNumEvents='10000': Approximate number of events to keep in memory. Prefer setting via System properties.
  -com.twitter.util.events.sinkEnabled='true': Whether or not event capture is enabled. Prefer setting via System properties.
  -socksPassword='': SOCKS password
  -socksProxyHost='': SOCKS proxy host
  -socksProxyPort='0': SOCKS proxy port
  -socksUsername='': SOCKS username
codefromthecrypt commented 8 years ago

That's correct. zipkin-query-service and collector still use the old scala config approach.

codefromthecrypt commented 8 years ago

This is why things are done with env vars, btw

codefromthecrypt commented 8 years ago

PS I'm in favor of letting flags pass through. It would help us reduce dependence on the "scala config" or hopefully remove it.

codefromthecrypt commented 8 years ago

no more zipkin-query