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

Spike: filter out stack traces from Ruby processes #19

Closed
mefellows opened this issue Apr 28, 2017 · 0 comments
Closed

Spike: filter out stack traces from Ruby processes #19

mefellows opened this issue Apr 28, 2017 · 0 comments
Assignees

Comments

@mefellows
Copy link
Member

See the below example, most of the output is noise:

		  2) Verifying a pact between API and Metrics A request to create a metric with POST /metrics returns a response which has a matching body
		     Failure/Error: expect(response_body).to match_term expected_response_body, diff_options
		       Actual: 404 page not found


		       @@ -1,7 +1,2 @@
		       -{
		       -  "sent": {
		       -    "json_class": "Pact::SomethingLike",
		       -    "contents": true
		       -  }
		       -}
		       +404 page not found

		       Key: - means "expected, but was not found".
		            + means "actual, should not be found".
		            Values where the expected matches the actual are not shown.
		     # ./bin/pact-provider-verifier/lib/vendor/ruby/2.1.0/gems/rspec-expectations-2.99.2/lib/rspec/expectations/fail_with.rb:32:in `fail_with'
		     # ./bin/pact-provider-verifier/lib/vendor/ruby/2.1.0/gems/rspec-expectations-2.99.2/lib/rspec/expectations/handler.rb:40:in `handle_matcher'
		     # ./bin/pact-provider-verifier/lib/vendor/ruby/2.1.0/gems/rspec-expectations-2.99.2/lib/rspec/expectations/expectation_target.rb:59:in `to'
		     # ./bin/pact-provider-verifier/lib/vendor/ruby/2.1.0/gems/pact-1.9.1/lib/pact/provider/rspec.rb:138:in `block (2 levels) in describe_response'
		     # ./bin/pact-provider-verifier/lib/vendor/ruby/2.1.0/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_exec'
		     # ./bin/pact-provider-verifier/lib/vendor/ruby/2.1.0/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_eval_with_args'
		     # ./bin/pact-provider-verifier/lib/vendor/ruby/2.1.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:116:in `block in run'

One suggestion would be to automatically detect this cruft (anything starting with # ./bin) and discard the output, possibly configured as a flag or via DEBUG logging.

This should greatly increase readability and user experience.

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

No branches or pull requests

1 participant