newrelic_rpm 9.7.1 → 9.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +47 -1
  3. data/README.md +1 -1
  4. data/lib/new_relic/agent/agent.rb +4 -1
  5. data/lib/new_relic/agent/agent_helpers/connect.rb +10 -8
  6. data/lib/new_relic/agent/agent_helpers/start_worker_thread.rb +1 -1
  7. data/lib/new_relic/agent/agent_helpers/startup.rb +2 -1
  8. data/lib/new_relic/agent/agent_logger.rb +2 -1
  9. data/lib/new_relic/agent/configuration/default_source.rb +67 -3
  10. data/lib/new_relic/agent/configuration/environment_source.rb +9 -1
  11. data/lib/new_relic/agent/configuration/high_security_source.rb +1 -0
  12. data/lib/new_relic/agent/configuration/manager.rb +28 -8
  13. data/lib/new_relic/agent/configuration/security_policy_source.rb +11 -0
  14. data/lib/new_relic/agent/configuration/yaml_source.rb +2 -0
  15. data/lib/new_relic/agent/connect/request_builder.rb +1 -1
  16. data/lib/new_relic/agent/custom_event_aggregator.rb +4 -4
  17. data/lib/new_relic/agent/distributed_tracing/distributed_trace_payload.rb +1 -5
  18. data/lib/new_relic/agent/error_collector.rb +2 -0
  19. data/lib/new_relic/agent/harvester.rb +1 -1
  20. data/lib/new_relic/agent/instrumentation/active_support_broadcast_logger/instrumentation.rb +7 -3
  21. data/lib/new_relic/agent/instrumentation/concurrent_ruby.rb +1 -0
  22. data/lib/new_relic/agent/instrumentation/elasticsearch/instrumentation.rb +6 -1
  23. data/lib/new_relic/agent/instrumentation/net_http/instrumentation.rb +6 -0
  24. data/lib/new_relic/agent/instrumentation/ruby_openai/chain.rb +36 -0
  25. data/lib/new_relic/agent/instrumentation/ruby_openai/instrumentation.rb +196 -0
  26. data/lib/new_relic/agent/instrumentation/ruby_openai/prepend.rb +20 -0
  27. data/lib/new_relic/agent/instrumentation/ruby_openai.rb +35 -0
  28. data/lib/new_relic/agent/llm/chat_completion_message.rb +25 -0
  29. data/lib/new_relic/agent/llm/chat_completion_summary.rb +66 -0
  30. data/lib/new_relic/agent/llm/embedding.rb +60 -0
  31. data/lib/new_relic/agent/llm/llm_event.rb +95 -0
  32. data/lib/new_relic/agent/llm/response_headers.rb +80 -0
  33. data/lib/new_relic/agent/llm.rb +49 -0
  34. data/lib/new_relic/agent/log_event_aggregator.rb +1 -16
  35. data/lib/new_relic/agent/new_relic_service.rb +12 -2
  36. data/lib/new_relic/agent/serverless_handler.rb +171 -0
  37. data/lib/new_relic/agent/threading/agent_thread.rb +1 -2
  38. data/lib/new_relic/agent/tracer.rb +5 -5
  39. data/lib/new_relic/agent/transaction/abstract_segment.rb +1 -1
  40. data/lib/new_relic/agent/transaction/tracing.rb +2 -2
  41. data/lib/new_relic/agent/transaction_error_primitive.rb +23 -19
  42. data/lib/new_relic/agent.rb +102 -8
  43. data/lib/new_relic/constants.rb +2 -0
  44. data/lib/new_relic/control/instance_methods.rb +7 -0
  45. data/lib/new_relic/local_environment.rb +13 -6
  46. data/lib/new_relic/rack/browser_monitoring.rb +8 -4
  47. data/lib/new_relic/supportability_helper.rb +2 -0
  48. data/lib/new_relic/thread_local_storage.rb +31 -0
  49. data/lib/new_relic/version.rb +2 -2
  50. data/lib/tasks/config.rake +2 -1
  51. data/newrelic.yml +27 -1
  52. metadata +14 -2
@@ -22,7 +22,8 @@ namespace :newrelic do
22
22
  'error_collector' => "The agent collects and reports all uncaught exceptions by default. These configuration options allow you to customize the error collection.\n\nFor information on ignored and expected errors, [see this page on Error Analytics in APM](/docs/agents/manage-apm-agents/agent-data/manage-errors-apm-collect-ignore-or-mark-expected/). To set expected errors via the `NewRelic::Agent.notice_error` Ruby method, [consult the Ruby agent API](/docs/agents/ruby-agent/api-guides/sending-handled-errors-new-relic/).",
23
23
  'browser_monitoring' => "The browser monitoring [page load timing](/docs/browser/new-relic-browser/page-load-timing/page-load-timing-process) feature (sometimes referred to as real user monitoring or RUM) gives you insight into the performance real users are experiencing with your website. This is accomplished by measuring the time it takes for your users' browsers to download and render your web pages by injecting a small amount of JavaScript code into the header and footer of each page.",
24
24
  'application_logging' => "The Ruby agent supports [APM logs in context](/docs/apm/new-relic-apm/getting-started/get-started-logs-context). For some tips on configuring logs for the Ruby agent, see [Configure Ruby logs in context](/docs/logs/logs-context/configure-logs-context-ruby).\n\nAvailable logging-related config options include:",
25
- 'analytics_events' => '[New Relic dashboards](/docs/query-your-data/explore-query-data/dashboards/introduction-new-relic-one-dashboards) is a resource to gather and visualize data about your software and what it says about your business. With it you can quickly and easily create real-time dashboards to get immediate answers about end-user experiences, clickstreams, mobile activities, and server transactions.'
25
+ 'analytics_events' => '[New Relic dashboards](/docs/query-your-data/explore-query-data/dashboards/introduction-new-relic-one-dashboards) is a resource to gather and visualize data about your software and what it says about your business. With it you can quickly and easily create real-time dashboards to get immediate answers about end-user experiences, clickstreams, mobile activities, and server transactions.',
26
+ 'ai_monitoring' => "This section includes Ruby agent configurations for setting up AI monitoring.\n\n<Callout variant='important'>You need to enable distributed tracing to capture trace and feedback data. It is turned on by default in Ruby agents 8.0.0 and higher.</Callout>"
26
27
  }
27
28
 
28
29
  NAME_OVERRIDES = {
data/newrelic.yml CHANGED
@@ -33,6 +33,18 @@ common: &default_settings
33
33
  # - a.third.event
34
34
  # active_support_custom_events_names: []
35
35
 
36
+ # If false, all LLM instrumentation (OpenAI only for now) will be disabled and no
37
+ # metrics, events, or spans will be sent. AI Monitoring is automatically disabled
38
+ # if high_security mode is enabled.
39
+ # ai_monitoring.enabled: false
40
+
41
+ # If false, LLM instrumentation (OpenAI only for now) will not capture input and
42
+ # output content on specific LLM events.
43
+ # The excluded attributes include:
44
+ # * content from LlmChatCompletionMessage events
45
+ # * input from LlmEmbedding events
46
+ # ai_monitoring.record_content.enabled: true
47
+
36
48
  # If true, enables capture of all HTTP request headers for all destinations.
37
49
  # allow_all_headers: false
38
50
 
@@ -324,7 +336,8 @@ common: &default_settings
324
336
  # error_collector.ignore_status_codes: ""
325
337
 
326
338
  # Defines the maximum number of frames in an error backtrace. Backtraces over this
327
- # amount are truncated at the beginning and end.
339
+ # amount are truncated in the middle, preserving the beginning and the end of the
340
+ # stack trace.
328
341
  # error_collector.max_backtrace_frames: 50
329
342
 
330
343
  # Defines the maximum number of TransactionError events reported per harvest
@@ -509,6 +522,10 @@ common: &default_settings
509
522
  # chain, disabled.
510
523
  # instrumentation.roda: auto
511
524
 
525
+ # Controls auto-instrumentation of the ruby-openai gem at start-up. May be one of:
526
+ # auto, prepend, chain, disabled.
527
+ # instrumentation.ruby_openai: auto
528
+
512
529
  # Controls auto-instrumentation of Sinatra at start-up. May be one of: auto,
513
530
  # prepend, chain, disabled.
514
531
  # instrumentation.sinatra: auto
@@ -612,6 +629,12 @@ common: &default_settings
612
629
  # before shutting down.
613
630
  # send_data_on_exit: true
614
631
 
632
+ # If true, the agent will operate in a streamlined mode suitable for use with
633
+ # short-lived serverless functions. NOTE: Only AWS Lambda functions are supported
634
+ # currently and this option is not intended for use without New Relic's Ruby
635
+ # Lambda layer offering.
636
+ # serverless_mode.enabled: false
637
+
615
638
  # An array of strings that will collectively serve as a denylist for filtering
616
639
  # which Sidekiq job arguments get reported to New Relic. To capture any Sidekiq
617
640
  # arguments, 'job.sidekiq.args.*' must be added to the separate
@@ -704,6 +727,9 @@ common: &default_settings
704
727
  # the New Relic agent has time to report.
705
728
  # sync_startup: false
706
729
 
730
+ # If true, tracer state storage is thread-local, otherwise, fiber-local
731
+ # thread_local_tracer_state: false
732
+
707
733
  # If true, enables use of the thread profiler.
708
734
  # thread_profiler.enabled: false
709
735
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newrelic_rpm
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.7.1
4
+ version: 9.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tanna McClure
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2024-01-25 00:00:00.000000000 Z
14
+ date: 2024-04-17 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler
@@ -480,6 +480,10 @@ files:
480
480
  - lib/new_relic/agent/instrumentation/roda/instrumentation.rb
481
481
  - lib/new_relic/agent/instrumentation/roda/prepend.rb
482
482
  - lib/new_relic/agent/instrumentation/roda/roda_transaction_namer.rb
483
+ - lib/new_relic/agent/instrumentation/ruby_openai.rb
484
+ - lib/new_relic/agent/instrumentation/ruby_openai/chain.rb
485
+ - lib/new_relic/agent/instrumentation/ruby_openai/instrumentation.rb
486
+ - lib/new_relic/agent/instrumentation/ruby_openai/prepend.rb
483
487
  - lib/new_relic/agent/instrumentation/sequel.rb
484
488
  - lib/new_relic/agent/instrumentation/sequel_helper.rb
485
489
  - lib/new_relic/agent/instrumentation/sidekiq.rb
@@ -513,6 +517,12 @@ files:
513
517
  - lib/new_relic/agent/internal_agent_error.rb
514
518
  - lib/new_relic/agent/javascript_instrumentor.rb
515
519
  - lib/new_relic/agent/linking_metadata.rb
520
+ - lib/new_relic/agent/llm.rb
521
+ - lib/new_relic/agent/llm/chat_completion_message.rb
522
+ - lib/new_relic/agent/llm/chat_completion_summary.rb
523
+ - lib/new_relic/agent/llm/embedding.rb
524
+ - lib/new_relic/agent/llm/llm_event.rb
525
+ - lib/new_relic/agent/llm/response_headers.rb
516
526
  - lib/new_relic/agent/local_log_decorator.rb
517
527
  - lib/new_relic/agent/log_event_aggregator.rb
518
528
  - lib/new_relic/agent/log_event_attributes.rb
@@ -552,6 +562,7 @@ files:
552
562
  - lib/new_relic/agent/samplers/memory_sampler.rb
553
563
  - lib/new_relic/agent/samplers/object_sampler.rb
554
564
  - lib/new_relic/agent/samplers/vm_sampler.rb
565
+ - lib/new_relic/agent/serverless_handler.rb
555
566
  - lib/new_relic/agent/span_event_aggregator.rb
556
567
  - lib/new_relic/agent/span_event_primitive.rb
557
568
  - lib/new_relic/agent/sql_sampler.rb
@@ -644,6 +655,7 @@ files:
644
655
  - lib/new_relic/recipes/capistrano_legacy.rb
645
656
  - lib/new_relic/recipes/helpers/send_deployment.rb
646
657
  - lib/new_relic/supportability_helper.rb
658
+ - lib/new_relic/thread_local_storage.rb
647
659
  - lib/new_relic/traced_thread.rb
648
660
  - lib/new_relic/version.rb
649
661
  - lib/newrelic_rpm.rb