text: 'use strict';
  var HttpHelper_1 = require('./util/HttpHelper');
  var os = require('os');
  var EnvironmentInspector = (function () {
      function EnvironmentInspector() {
      }
      EnvironmentInspector.prototype.requestStart = function (req, res) {
          // no-op
      };
      EnvironmentInspector.prototype.requestEnd = function (req, res) {
          var context = HttpHelper_1.HttpHelper.getContext(req);
          if (context) {
              // TODO: Should we be using a start time that's part of the context?
              var now = this.agent.providers.dateTime.now;
              var currentMoment = now.getMoment();
              this.agent.broker.sendMessage({
                  serverName: os.hostname(),
                  serverTime: now.format(false),
                  serverTimezoneOffset: now.getUTCOffset(true),
                  serverDaylightSavingTime: currentMoment.isDST(),
                  serverOperatingSystem: os.type(),
                  runtimeVersion: process.version,
                  runtimeArchitecture: os.arch()
              }, ['environment'], undefined, context);
          }
      };
      EnvironmentInspector.prototype.responseEnd = function (req, res) {
          // TODO: Remove once http-proxy allows for removal.
      };
      EnvironmentInspector.prototype.init = function (agent) {
          this.agent = agent;
      };
      return EnvironmentInspector;
  }());
  exports.EnvironmentInspector = EnvironmentInspector;
  
  //# sourceMappingURL=../../maps/inspectors/EnvironmentInspector.js.map
  